Game Development Community

Level editor dynamic fields vs. script dynamic fields

by Man-Machine · in Torque Game Builder · 04/14/2009 (12:38 am) · 0 replies

Ok, if I have many objects in the level editor that are from the same class. I may want some of these objects to have different values for script created dynamic fields. Is there a way to automatically create dynamic fields in the level editor with a default value?

This is how I'm creating my dynamic fields

function EnemyWeapon::onLevelLoaded(%this, %scenegraph)
{
	%this.speed = 20;
}

I know OOP programming but I'm new to Torque script way of thinking and sometimes little things like this get me. This is the first time I have more than one object in the level editor assigned to the same class that need their dynamic field values to be different.