Item Location
by Howard Dortch · in Torque Game Engine · 05/23/2004 (7:01 pm) · 1 replies
I placed a few items in the world, namely ammunition. When the mission loads I would like to change the position so it's not in the same place all the time. I can see the position of the item in the mission file but fail to see a way of referencing the pistol ammo or the riffle ammo since they are referenced only as new Item()in the mission file. Since a pure random number might place the ammo inside a wall I assume I can make a list of locations and randomly select? Anyone have an idea on how do implement this?
Torque Owner Bruno Grieco
HTH
Bruno
%x = ( whatever x ) %y = ( whatever y ) %transf = %x SPC %y @ " 0"; $milho[%i] = new StaticShape() { dataBlock = Yourshape; Position = %transf; percent = 100; index = %i; }; MissionCleanup.add($milho[%i]); }