Home   Help Search Login Register  

Author Topic: Keeping name of vehicle after respawn  (Read 1276 times)

0 Members and 1 Guest are viewing this topic.

Pimmelorus

  • Guest
Keeping name of vehicle after respawn
« on: 31 Mar 2003, 11:41:53 »
Hi all,

I new to the world of scripting so dont expect much of my skills...

Similar like Terox wrote in another post I cannot get the tailrotor-failure-script (by Vektorboson) to work in my multiplayer map by putting it in the vehicle respawn script. As was suggested earlier, this problem could be solved by putting a trigger in the map that looks for damage of a specifically assigned chopper and if triggered then activates the tailrotor-failure-script. Problem is that when the crashed chopper has respawned that trigger does not apply to that chopper anymore as the original name is not passed to the newly created vehicle.

So, heres the question: how I can I assign a name to a newly created unit. Of course I can feed the name of that unit into the respawn script by adding it to the variables that this script needs. Sorry that i dont know the right names for that , but i mean like this:

[this, "BAS_mH6","VehicleName"] exec "respawn.sqs"

And then in the script:

_vehicle = _this select 0
_class = _this select 1
_name = _this select 2

Now the respawn script knows the name of the vehicle. Then I need to assign the "VehicleName" string to the name of the created vehicle. Is there a way to do this?

Things that I even understand less is the client-server communication. If I understood well I have to let every client know that this unit with the name "VehicleName" has been created. Am I correct on this one, and if so, how do I do this?

If things are not clear I can provide additional info, but dont start to talk very techy language or I wont understand you ;)

Thnx in advance,

Pimmelorus
[Zeus addon server]

« Last Edit: 31 Mar 2003, 13:58:04 by Pimmelorus »

Offline andersson

  • Members
  • *
  • I'm a llama!
Re:Keeping name of vehicle after respawn
« Reply #1 on: 12 Apr 2003, 17:50:28 »
Hmm.. I would like an answer on that too. Have a similar problem with another script...

Rock

  • Guest
Re:Keeping name of vehicle after respawn
« Reply #2 on: 26 Sep 2003, 08:57:35 »
Has anyone ever figured out how to do this effectively?

MONOLITH

  • Guest
Re:Keeping name of vehicle after respawn
« Reply #3 on: 10 Oct 2003, 08:47:08 »
This may sound like a poor response, and you have prob already looked at this option, but could you use the camcreate command, as that assigns ID to vehicles.
e.g

unit name = "M1ABRAMS" camcreate getpos whatever