Player spawned objects
by Carl A Harris · in Torque 3D Professional · 12/31/2010 (7:58 pm) · 3 replies
Are there any suggestions on how to make a player created/spawned object?
Like a turret or a simple block to take cover behind. Even pick up and move.
Or perhaps better key words to use, to locate these types of resources.
Like a turret or a simple block to take cover behind. Even pick up and move.
Or perhaps better key words to use, to locate these types of resources.
About the author
#2
Take notice of the WeaponImage::onFire function, this function spawn a projectileType object, but could easily be changed to spawn any other object type.
Try this;
12/31/2010 (11:35 pm)
A wonderful learning example of player initiated object interaction is found in the weapon.cs script file. Take notice of the WeaponImage::onFire function, this function spawn a projectileType object, but could easily be changed to spawn any other object type.
Try this;
%p = new Item()
{
dataBlock = "HealthKitSmall";
position = %obj.getMuzzlePoint(%slot);
};in place of;%p = new (%this.projectileType)()
{
dataBlock = %this.projectile;
initialVelocity = %muzzleVelocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
#3
01/01/2011 (4:52 am)
Thanks guys, I'll try that. :)
Associate Michael Hall
Distracted...