Scripts / Entity Group Scripts ??

Author
Message
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 28th Jan 2015 18:55
Not sure as this may be a feature suggestion/question.

Is there a way (or will there be a way) to group entities together, so that a script can act upon all of them at once rather than separate script functions for each entity?

Example: I want to create a script that moves 5 vehicles in the same direction and at the same speed together. I can do this with a single shared script now, but each entity moves as each engine cycle runs the script for each entity. I'm thinking of a script for the group in which they all move together as a group.

Possible????

Thanks

"There is no spoon"
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Jan 2015 19:08
if you input the numbers then yes, there is no standard way to define the entities otherwise though (by name etc - unless you assign a script yourself to do so)

i.e.
for vehicle = 1, 5 do
MoveForward(vehicle,1000)
end

(assuming the entity numbers for the vehicles are 1,2,3,4 & 5)
once you start moving/placing stuff in different orders it gets more complicated, hopefully one day soon we will be able to read the 'name' of an entity directly or somthing

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-05-07 05:38:06
Your offset time is: 2024-05-07 05:38:06