View Full Version : UserAction - Radius of effect doggy
Jun 12 2007, 14:41
I've noticed in ArmA (unlike OFP) the UserActions assigned to addons (be it scripted or part of Config) seem to be very difficult to trigger being within the radius and have it appear on your menu.
You can be within the defined radius but you don't seem to get the menu until you spin or twist or look up or down just right ........ but no idea why its so hard.
Any tips/tricks to fix/setup these Config Useractions? http://forums.bistudio.com/oldsmileys/confused_o.gif
I'm trying to get a large radius (300 meters+) for the Kuznetsov Arrestor Hook script (just like OFP), but no matter how hard I try I can't get the action menu item as I approach the Carrier. I'm definitely within the radius and I've even modified to so "condition=true" to avoid any other effects being the problem.
i dunno if this can be corrected in the cpp but maybe you can do that with a script that detect/select/add action to the nearest plane ??
Jun 12 2007, 23:54
Thanks Jimmc, but my #1 rule of Addon making and scripting, don't create forever script loops if you can avoid it.
The way user actions interact with the interface has been modified in Arma. You have to be looking directly at the object for them to show up. Easy enough when your holding a rifle, just move the crosshair over the object. It helps reduce the amount of actions displayed when you have multiple actions.
But as you pointed out, not so easy in an aircraft. It's a shame it's not an option. As there are a few other tricks that won't work now http://forums.bistudio.com/oldsmileys/sad_o.gif
The only way round it AFAIK, is to attach the Action to the vehicle. Why not use a trigger and the AddAction (http://community.bistudio.com/wiki/addAction) command?
Jun 13 2007, 13:22
Ok UNN, that makes sense ...... maybe for an experiment I'll add 500 memory points in a "net" and see if that works http://forums.bistudio.com/oldsmileys/wink_o.gif
Yes, AddAction would work, tried it before, but this means every vehicle has to be "mission" customised, and for then done every respawn no doubt ...... painful for the mission maker.
I guess it will be my Plan B
Be nice if BIS just had a UserAction config option like;
WideEffect = 1
Quote[/b] ]Yes, AddAction would work, tried it before, but this means every vehicle has to be "mission" customised, and for then done every respawn no doubt
Can't you just create a trigger using the Carriers config init event. Then just add and remove the action whenever a player enters or leaves the triggers radius? No intervention required by the Mission Editor then.
Jun 14 2007, 13:55
Hmmmm ... point, but I must say I've never created a trigger except in the editor ..... so your saying I can script a trigger to life ?
There is the createTrigger (http://community.bistudio.com/wiki/createTrigger) command. Not used it yet, but I don't think there are any problems with it.
Should make life a little easier in MP if you use a trigger.
Jun 15 2007, 14:37
Ooooohhhh .... nice ! http://forums.bistudio.com/oldsmileys/biggrin_o.gif
Thanks UNN, I hadn't notice it before .... http://forums.bistudio.com/oldsmileys/whistle.gif
Now for my next trick .... in MP can I detect if a vehicle already has a addAction attached before trying to add it again .... http://forums.bistudio.com/oldsmileys/tounge2.gif
Jul 3 2007, 13:43
User action appears if you are within defined range (config, memory points in model) and pointing your cursor on some visible part of the model (View geometry). Usualy ladder objects have problems, because view geometry contains nothing that you can point at.
Jul 3 2007, 15:31
Arh! .... thx Armored Sheep .... I need to check my View Geo to see if a) I have one and b) it is big enough to be a target http://forums.bistudio.com/oldsmileys/smile_o.gif
Jul 15 2007, 21:06
Don't think you can tell if someone has a specific action added, but what I do is to use setVariable to attach the action number to the object. That way, I can tell if something has an action attached and be able to know the index when I want to remove it at a later date. I set the variable to -1 when I remove the action again.
Jul 21 2007, 06:20
you anyone please pinpoint me to the config value to alter the radius of default ArmA useractions - cheers!
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">radius=4;
condition= "this animationphase ""door"" < 0.5";
statement = "this animate [""door"", 0]";[/QUOTE]
@<hidden> gnat /all
I am having trouble with this too and cant figure it, so far all actions seem to use [this] exec blah sqs to close doors and open in custom addons and yet it should be easy enough to get the engine to do it, but it isnt http://forums.bistudio.com/oldsmileys/sad_o.gif.
Jul 21 2007, 07:45
thanks for the try ofp2 http://forums.bistudio.com/oldsmileys/smile_o.gif
however yours is a script, i was asking for the config value http://forums.bistudio.com/oldsmileys/smile_o.gif
no thats the config http://forums.bistudio.com/oldsmileys/smile_o.gif
under class useractions . the radius value you see there is the radius around the memory point that the action can be see http://forums.bistudio.com/oldsmileys/smile_o.gif
i thought the double "" might have given it away for you http://forums.bistudio.com/oldsmileys/wink_o.gif
Jul 21 2007, 11:41
you are right http://forums.bistudio.com/oldsmileys/smile_o.gif sorry about that.
still its not what i am looking for here http://forums.bistudio.com/oldsmileys/confused_o.gif
edit: found it http://forums.bistudio.com/oldsmileys/biggrin_o.gif
supplyRadius and getInRadius
hmm supply radius looks interesting , any idea what the definition of that is ?
Jul 21 2007, 14:50
Represents a circular area (radius in meters from centre of object for action to take place
getInRadius=3.5; // tank
supplyRadius = 2.5; // for fuel dumps ammo trucks etc
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.