Blockland Forums > Modification Help

Changing speed, jumping, in player datablocks

Pages: << < (2/5) > >>

Minnax:


--- Quote from: Red_Guy on March 29, 2011, 06:20:23 PM ---sure.. but its better to modify the datablock values once at the beginning and then leave it.  if you have to change the datablock values all the time, then you are doing something wrong.

from the console:
echo( findclientbyname("yourname").player.dataBlock );
<somedbname>

then:
<somedbname>.value = NewValue;


--- End quote ---


Well, prehaps I should explain this further.

It is gona be used for my weapon set. Some weapons are heavier than others. When you mount some, I want to it change the value of the datablock you are using, so you can still jet, or use tacknife.

pocketrocket300:

Just make different player datablocks that switch when you equip a gun.

Minnax:


--- Quote from: pocketrocket300 on March 30, 2011, 02:17:02 AM ---Just make different player datablocks that switch when you equip a gun.

--- End quote ---

--- Quote from: Minnax on March 29, 2011, 11:00:17 PM ---
Well, prehaps I should explain this further.

It is gona be used for my weapon set. Some weapons are heavier than others. When you mount some, I want to it change the value of the datablock you are using, so you can still jet, or use tacknife.
--- End quote ---


lordician:

There is a reason that people use other datablocks for changing the value of a field when equipping something.

It is becase when you want to change the value of a field of a datablock you will have to

--- Quote from: Deathwishez on March 29, 2011, 10:10:52 PM ---reload them.

--- End quote ---
This is because datablocks are preloaded.
When you change them, the whole server would have to redownload them.

Red_Guy:


--- Quote from: Minnax on March 29, 2011, 11:00:17 PM ---
Well, prehaps I should explain this further.

It is gona be used for my weapon set. Some weapons are heavier than others. When you mount some, I want to it change the value of the datablock you are using, so you can still jet, or use tacknife.

--- End quote ---
Thats an example of things not working the way you want.

What will happen is that when one person equips a heavy weapon, and your script changes the datablock to slow down that player - EVERYBODY will slow down.  The same datablock is used for all players, so changing the values affects everyone.

Your best option here is to follow picketrocket's advice and make different player datablocks for each weapon type.


Pages: << < (2/5) > >>

Go to full version