Home   Help Search Login Register  

Author Topic: addAction display problem in ArmA  (Read 1717 times)

0 Members and 2 Guests are viewing this topic.

Offline Nuclear Paul

  • Members
  • *
  • I'm a llama!
addAction display problem in ArmA
« on: 02 Apr 2007, 11:56:09 »
Does anyone know how to use addAction in Arma without displaying the name of the command in the middle of the screen? It's annoying the hell out of me! I know it's got something to to with all the extra commands, but no one seems to be able to show a working example of it. SOMEONE PLEASE HELP!

Offline Yakuzi

  • Members
  • *
Re: addAction display problem in ArmA
« Reply #1 on: 02 Apr 2007, 14:51:43 »
See next reply   :whistle:

Hi Paul!

If you put the addaction command in an init.sqs file in your mission folder, the action name won't popup in the middle of your screen as the mission initialises.
For example type in init.sqs:


Code: [Select]
Soldier1 addaction ["Suicide","harikiri.sqs"]

end

You can make the init.sqs just as an normal script file.
Hope this helps  ;)

EDIT: It doesn't seem to work all the time; If the addaction line is the first line of the init.sqs the action name will still popup in the middle of the screen.
          When it follows another line of code it won't show up (in my case after Soldier2 setdammage 1) and the unit needs to have a list of actions available
          already (It works with a saboteur but not with a rifleman)
« Last Edit: 02 Apr 2007, 15:53:19 by Yakuzi »
I taught your girlfriend that thing you like...

Offline Yakuzi

  • Members
  • *
Re: addAction display problem in ArmA
« Reply #2 on: 02 Apr 2007, 15:24:08 »
Well I found the solution I think, in ArmA the action command has apparently been enhanced to
unit addAction [title, filename, arguments, priority, showWindow, hideOnUse, shortcut]
where the showWindow option codes for the pesky action name popup. Put the following format in your units init field and you shouldn't have anymore problems (deo volente)  ;)

Code: [Select]
this addaction ["Suicide","harikiri.sqs", 0, 0, false]
This should also prevent other players to access actions specific to one unit
« Last Edit: 02 Apr 2007, 15:49:07 by Yakuzi »
I taught your girlfriend that thing you like...

Offline Nuclear Paul

  • Members
  • *
  • I'm a llama!
Re: addAction display problem in ArmA
« Reply #3 on: 04 Apr 2007, 13:11:51 »
hmmm... tried it but it's still the same. I also want to use it in general scripts for respawn missions too. It's a real bummer, it's the sort of thing you'd expect them to make appear in pirated versions to p**s you off enough so you buy the original...

Offline Yakuzi

  • Members
  • *
Re: addAction display problem in ArmA
« Reply #4 on: 04 Apr 2007, 19:08:52 »
How strange I don't have any problems...
EDIT: just had a little tryout session, I guess you use a rifleman or a unit that doesn't have any initial actions when you start the game.
In that case you should put the addaction script in the init.sqs like so:

Code: [Select]
rilfeman_1 addaction ["Harikiri","suicide.sqs", 0, 0, false]
Where rifleman_1 is the unit with the action (obviously  ;))

This works for me, if it still doesn't for you, post yer mission and I'll have a look at it.
I have some workarounds up me sleeve, but they aren't as pretty as the code above  :dry:

G'luck
I taught your girlfriend that thing you like...