I wanted to implement multiple cannons into my sail boat project. I figured that having multiple projectile objects in the project was needlessly innefficient. Instead, my plan was to have a single projectile object, that was moved around the ship and started four times in succession (for the groups of guns on either side of the ship).
For example:
gunrot[0] represents the orientation for the left-hand guns, and gun[1,2,3] represent the locations of the four guns.
However, when I run this section of the script, the projectile object is only started once. I am guessing that it doesn't react well when started multiple times in succession?
Anyway, I was wondering if there was a way to fix this, or if there was a way to add a delay before each 'iObjectStart' command.
Do you guys have any thoughts?
For example:
Code: [Select]
iObjectChildTransform(OBJ_0,OBJ_264,gunrot[0],gun[0]);
iObjectStart(OBJ_264);
iObjectChildTransform(OBJ_0,OBJ_264,gunrot[0],gun[1]);
iObjectStart(OBJ_264);
iObjectChildTransform(OBJ_0,OBJ_264,gunrot[0],gun[2]);
iObjectStart(OBJ_264);
iObjectChildTransform(OBJ_0,OBJ_264,gunrot[0],gun[3]);
iObjectStart(OBJ_264);
gunrot[0] represents the orientation for the left-hand guns, and gun[1,2,3] represent the locations of the four guns.
However, when I run this section of the script, the projectile object is only started once. I am guessing that it doesn't react well when started multiple times in succession?
Anyway, I was wondering if there was a way to fix this, or if there was a way to add a delay before each 'iObjectStart' command.
Do you guys have any thoughts?