Game Development Community

datablocks; setting up player stats

by rennie moffat · in Torque Game Builder · 08/12/2009 (10:32 am) · 2 replies

If I want to pre set up all relevant info for a hero/player I believe I can do so in a datablock. His size, speed etc, all can be pre set up in there.

What I am wondering is it worth, should I set one up, and where? In the player.cs or a datablock.cs which holds all datablocks, oR. should I just determine that stuff inside the TGB console itself?

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
08/13/2009 (10:33 pm)
The real power of a datablock is for configuring multiple objects with the same base data. Most datablocks are defined in datablocks.cs

You could use a datablock to define your heroes stats but if you only have one hero it would probably be just as easy to set those values in script.

let's say you had a horde of goblins that spawned 1 at a time with the same image and base stats. you could define a datablock for their settings and set the spawner to create goblins with that datablock and they'd all have the same settings that way without having to define each one. that's where a datablock is really helpful.

I'm still a novice at all this, so hopefully I explained it well. And hopefully I'm correct ^^
#2
08/14/2009 (6:12 am)
hopefully your corrected?! Hopefully you're right!

Thanks,
that helps, now today it's getAnimation.