Home   Help Search Login Register  

Author Topic: Dissapearing Action  (Read 1611 times)

0 Members and 1 Guest are viewing this topic.

24Gamer

  • Guest
Dissapearing Action
« on: 02 May 2005, 18:26:09 »
I have a problem with my map, its a race map and you build the vehicles with an action called 'Build'
only two scripts have control over the action
playeractions.sqs:
Code: [Select]
#init
@!Alive Player
player removeaction NewCar; player sidechat "Build Removed [playeractions.sqs]"
@Alive Player
removeallweapons player
_TempCHT = "Parachute" createvehicle [getpos player select 0, getpos player select 1, 70]
player moveindriver _TempCHT
_TempCHT setpos [getpos _TempCHT select 0, getpos _TempCHT select 1, 70]
~2
NewCar = player addaction ["Build", "Actions\CreateCar.sqs"]; player sidechat "Build added [playeractions.sqs]"
goto "init"
and createcar.sqs
Code: [Select]
Temp = RealType createvehicle getpos player
Temp SetDir getdir Player
~0.01
player moveindriver Temp
Temp Setidentity ""
player removeaction NewCar; player sidechat "Build Removed [CreateCar.sqs]"
Hint Format ["Your %1 is Ready", RealType]
~5
?(Alive Player):NewCar = player addaction ["Build", "Actions\CreateCar.sqs"]; player sidechat "Build added [CreateCar.sqs]"
sometimes during the game, the build option is not there, and this can be a real problem as the only way to fix it is to comit suicide :/
any suggestions why it may not appear?
or how i can detect whether it is present?
« Last Edit: 15 May 2005, 09:36:31 by 24Gamer »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Dissapearing Action
« Reply #1 on: 02 May 2005, 19:42:06 »
if the player is inside a vehicle when the action is created, then he wont see the action until he disembarks

I dont know if the same thing occurs when a unit is given the action whilst outside the vehicle

does this answer your query, or are you sayting the whole thing is intermittent
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

24Gamer

  • Guest
Re:Dissapearing Action
« Reply #2 on: 03 May 2005, 00:11:24 »
im talking about when they are out of the vehicle, so what your saying doesnt matter unless the player is in some sort of state when the action is added and is lost?
like when you mount something maybe?
is there a way i can know if the action exists?
plz reply, its ruining my map :(

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Dissapearing Action
« Reply #3 on: 04 May 2005, 14:05:31 »
have a boolean come true when the action is added and then use a hintbox to return the value of the boolean, this way you know whether it has been added.

also place some debug hint liners in your scripts so that you can see where the script is hanging etc

i would also use a killed eventhandler attached to the player which runs when he is killed.

this will remove the requirement for your looping script
« Last Edit: 04 May 2005, 14:07:25 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

24Gamer

  • Guest
Re:Dissapearing Action
« Reply #4 on: 05 May 2005, 14:55:20 »
as you can see by the scripts i have hints telling me when the action is added/removed i have still yet to pin point the problem, i believe the problem is that the action isnt getting added when i use playeraddaction but ill give the boolean idea a go just in case, what i really need is a command that tells me whether the action exists, you know if there is such a command?
thanks  8)

24Gamer

  • Guest
Re:Dissapearing Action
« Reply #5 on: 05 May 2005, 15:23:47 »
ive created a quick fix
i added a radio function to add the build action if the player finds it no longer exists
its a bit sloppy tho

24Gamer

  • Guest
Re:Dissapearing Action
« Reply #6 on: 08 May 2005, 13:37:40 »
i am still eager to find out a proper solution
thanks

24Gamer

  • Guest
Re:Dissapearing Action
« Reply #7 on: 31 May 2005, 20:10:58 »
BUMP  :P