OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Hieronymus Erasmus on 07 Aug 2005, 12:28:36

Title: respawn script
Post by: Hieronymus Erasmus on 07 Aug 2005, 12:28:36
I friend of mine gave me this respawn script. It does not work, whats wrong with it?!?

#mafia1add
mafia1 removeaction mafia1_cash
mafia1 removeaction tel
mafia1_hot = false
PublicVariable "mafia1_hot"
~45
deleteVehicle mafia1
~45
?!(mafia1 == player) : goto "begin"
mafia1_cash = mafia1 addaction["Show my cash!","mafia1cash.sqs"]
mafia1 addaction["Teleport me to Mafia Base for 500$","teleport.sqs"]
mafia1cash = 0
_msg = format ["%1, you have been cloned at hospital. All your cash is gone. And yes... that one medic guy looks like a gay.", name mafia1]
?(mafia1 == player) : hint _msg
goto "begin"
Title: Re:respawn script
Post by: Artak on 07 Aug 2005, 12:47:53
This is from a mission called Nogville and there doesn't apear to be any syntax errors.
Could you be more specific. How does it not work? What does it do? What does it not do? Any error messages? How have you set it up? That's not the whole script is it?
Title: Re:respawn script
Post by: Hieronymus Erasmus on 08 Aug 2005, 08:26:51
Argh! I will kill myself.
Title: Re:respawn script
Post by: Serial Killer on 08 Aug 2005, 10:29:16
Don't do it just because of one respawn script.
Just tell us what Artak told you and maybe others can help. ;)

What is this script called? What respawn type is in your description.ext file?
Title: Re:respawn script
Post by: Garcia on 08 Aug 2005, 13:55:48
I friend of mine gave me this respawn script. It does not work, whats wrong with it?!?

#mafia1add
mafia1 removeaction mafia1_cash
mafia1 removeaction tel
mafia1_hot = false
PublicVariable "mafia1_hot"
~45
deleteVehicle mafia1
~45
?!(mafia1 == player) : goto "begin"
mafia1_cash = mafia1 addaction["Show my cash!","mafia1cash.sqs"]
mafia1 addaction["Teleport me to Mafia Base for 500$","teleport.sqs"]
mafia1cash = 0
_msg = format ["%1, you have been cloned at hospital. All your cash is gone. And yes... that one medic guy looks like a gay.", name mafia1]
?(mafia1 == player) : hint _msg
goto "begin"

Let's guess that the respawn time is 90 seconds and that the respawn type is base, then do this way would at least be better. Though I have no idea what might be wrong. Not much to work with then we don't know the respawn type, respawn time, what's wrong etc.

Quote
#mafia1add
mafia1 removeaction mafia1_cash
mafia1 removeaction tel
mafia1_hot = false
PublicVariable "mafia1_hot"
_body = mafia1
~90
deleteVehicle _body
?!(mafia1 == player) : goto "begin"
mafia1_cash = mafia1 addaction["Show my cash!","mafia1cash.sqs"]
mafia1 addaction["Teleport me to Mafia Base for 500$","teleport.sqs"]
mafia1cash = 0
_msg = format ["%1, you have been cloned at hospital. All your cash is gone. And yes... that one medic guy looks like a gay.", name mafia1]
?(mafia1 == player) : hint _msg
goto "begin"

btw, would be nice to actually have the whole script too...
Title: Re:respawn script
Post by: Hieronymus Erasmus on 08 Aug 2005, 18:06:38
Yes that was the problem, I accidently just used half the script.  :(