Game Development Community

Datablocks...

by Nathan Cox · in General Discussion · 05/21/2008 (12:26 pm) · 3 replies

Ok. I want to make it so that when a certain Character Detail is a certain value it will change the datablock maxForwardSpeed, but when i do it, even when i'm a host, it just makes it look like its badly lagging and not working!

#1
05/21/2008 (1:36 pm)
Though you can change the Datablock during runtime, it is not recommended.
Your Datablocks are loaded once during game startup and not again until you restart or perhaps change mission area / zone and back again.

The defined datablocks data is static, so you can reference that data with a function first to obtain the players base speed value.. then when you need to change that speed value you can use a "Package" sort of function to temporarily assign a new speed value. when your done with the increased value you can pop it from the stack.

I'm still sorta new at this.. so maybe others can check logic here.
#2
05/22/2008 (8:48 am)
I don't understand, sorry :( .

I wish there was another way...
#3
05/22/2008 (9:52 am)
Scott is correct, Datablocks are static and meant for one time transmission.

The best way to add dynamically changing speed would be to make source code changes to the engine. However, there is a resource that allows it to be done via script only.