A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »How to obtain ID/Index of manually spawned warthog

Author Topic: How to obtain ID/Index of manually spawned warthog (3 messages, Page 1 of 1)
Moderators: Dennis

Dennis

Joined: Jan 27, 2005

"We are made of starstuff.” ― Carl Sagan


Posted: Feb 25, 2008 08:41 PM    Msg. 1 of 3       
Does anyone know how to obtain the ID/Index of a manually spawned warthog?

If I manually spawn a warthog cheat_spawn_warthog then want to manually destroy it. How can I get it's index.

I tried object_destroy (list_get (vehicles) 0) and all numbers from 0-9 and was unsucessfull.


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Feb 25, 2008 09:04 PM    Msg. 2 of 3       
As far as I know, I don't believe there is any way to obtain the index of a spawned warthog, at least through scripts. And although there is an object list variable called "players" that works for players, there is no variable called "vehicles" that works for vehicles.

However, if you did want to be able destroy unnamed objects, you would first create a scenario with a reference to the tag that you want to be destroyed, using Kornnman's Guerilla. Then you could set up an object_definition type global variable in a script that has its value set to that tag's path. Once you compile the map, you could use objects_destroy_by_definition to destroy all instances of that tag in the map using the name of that variable as the argument.

But, you would have to modify a map for that, so it's not really useful, unless it's something you want to try on your own.


Dennis

Joined: Jan 27, 2005

"We are made of starstuff.” ― Carl Sagan


Posted: Feb 25, 2008 09:37 PM    Msg. 3 of 3       
Quote: --- Original message by: Me KS
As far as I know, I don't believe there is any way to obtain the index of a spawned warthog, at least through scripts. And although there is an object list variable called "players" that works for players, there is no variable called "vehicles" that works for vehicles.
I wasn't sure if there was a list variable for vehicles since the List_Get <object_list> was all I had to go on, but it made sense that there would be, I'll have to just edit the maps and add a named vehicle so i can reference it.

Thanks for the information.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 3:27 PM 141 ms.
A Halo Maps Website