Blockland Forums > Modification Help
Key Functions
<< < (3/4) > >>
ThinkInvisible:
@above:
i thought Headcrab was referring to the question about crosshair.
setPosition, used on a player, crashes blockand for some reason.
player.setposition("x y z");
However, position =  does not.
player.position = "x y z";


I found out what happens at extreme axis values. Tested on Creek map.

At 1k, nothing. This is a normal, walking-reachable(in about half an hour maybe :P) value.
-Nothing. Just for comparison.

At 10k, almost nothing. Stuff starts vibrating maaaybe a little.
-No visible difference. Almost.

At 100k, water and your player twitch.
-Water twitches
-Player twitches

At 1mil, stuff breaks.
-Hard to build
-Particles are misshapen
-Ground has holes
-Water has holes and is badly misshapen
-Vehicles shake some
-Short bricks disappear almost completely
-A tall column of bricks appears to be bent and twisted
-Player looks odd

At 10mil, a lot of stuff breaks and your blockland freezes eventually.
-Holes in the ground
-Ground collision is separate from ground appearance
-Can't place bricks right
-Projectile trails zigzag crazily
-Can't move until at extreme velocity, then you shift over a long way
-Water has lots of holes
-Terrain and water shift holes and shape crazily
-You can fall through the ground in places
-Can't see bricks right
-Player twitches crazily
-Held item separates from hand
-Other stuff breaks
-Potential blockland crash
-Player resizes crazily

At 100mil, calamity.
-Player resizes to no end
-Held item resizes to no end
-Stuff breaks
-No terrain
-No water
-Falling endlessly
-Can't move
-Can barely see

At 1bil, nothing. Similar to player-deleted.
-Images leave trails
-Can't see because of above
-I think i got some console errors
-Stuff probably breaks
-Can't move
-Can barely see chat

You can't go to 10bil. It sends you back to the start.
-Sends you to 0 0 0
-Possibly gives an error saying how stupid you are
ThinkInvisible:
Unanswered:

-What's the best way to spawn a bot that Blockland treats like a player? Testing purposes.
--If possible, include a way to give it a client and make a new clientobject.
-Is there a way to tumble a player without actually tumbling the player? (Set aim)
-Is there a way to switch the controlobject of two players/vehicles/etc? I've tried and it crashes everyone.

-I'm also trying to make a mod that creates crosshairs over other players. Just for coolness. How would I convert a 3D position into a 2D position, and test if it would be offscreen?

-How do i detect if a key is being held down/is released/was just pressed?
-How do i detect what keys are currently being held down? If i know the above i could just set up a loop or something.
-How do i simulate a keypress?
PARTIAL: I need to know how to do this without using keybinds.
Amade:

--- Quote ----What's the best way to spawn a bot that Blockland treats like a player? Testing purposes.
--If possible, include a way to give it a client and make a new clientobject.
--- End quote ---
What are you needing to test like this? There's likely an easier way.


--- Quote ----Is there a way to tumble a player without actually tumbling the player? (Set aim)
--- End quote ---
Yes, by messing with the rotation part of their transform.


--- Quote ----Is there a way to switch the controlobject of two players/vehicles/etc? I've tried and it crashes everyone.
--- End quote ---
Yes. Just switch their controlobjects and client/player variables and nothing should go too wrong.


--- Quote ----I'm also trying to make a mod that creates crosshairs over other players. Just for coolness. How would I convert a 3D position into a 2D position, and test if it would be offscreen?
--- End quote ---
This would be extremely difficult, I would recommend waiting to attempt this..


--- Quote ----How do i detect if a key is being held down/is released/was just pressed?
--- End quote ---
Package the keybind's function.


--- Quote ----How do i simulate a keypress?
--- End quote ---
You would simply need to call the function the keypress would activate.


--- Quote ---PARTIAL: I need to know how to do this without using keybinds.
--- End quote ---
Keybinds are the only way torquescript can detect key presses.
ThinkInvisible:

--- Quote from: Amade on August 08, 2011, 07:23:59 PM ---What are you needing to test like this? There's likely an easier way.
Yes, by messing with the rotation part of their transform.
Yes. Just switch their controlobjects and client/player variables and nothing should go too wrong.
This would be extremely difficult, I would recommend waiting to attempt this..
Package the keybind's function.
You would simply need to call the function the keypress would activate.
Keybinds are the only way torquescript can detect key presses.

--- End quote ---
1: Various projectile and client-affecting mods.
2: But what's that? All i know about is setPosition/Position =.
3: You really need to explain this stuff. Client/player VARIABLE?
4: [sigh] I thought someone'd say that...
5/6/7: [longer sigh] I thought someone'd say that too.
ThinkInvisible:
Still unanswered:

-What's the best way to spawn a bot that Blockland treats like a player?
--If possible, a way to include a clientname+BLID would be appreciated.

-Is there a way to tumble a player without actually using the tumble function?

-How do you switch the controlObject of two clients without breaking something?
Navigation
Message Index
Next page
Previous page

Go to full version