The Loot Posted July 23, 2013 Report Share Posted July 23, 2013 I've made a radio command that switches the normal people out for ones with only vehicle call commands and then back again. So far so good, but I'm having issues with when and how the command activates. I'd like it to ONLY activate when pushing the command button (not when clicking on the caller, ground, another person, vehicle, or object), and only when the caller is playing an idle animation, since there's issues with them being in the middle of other things when trying to remove the old prototype. One issue I've run into, though, is that when in an building interior, they get stuck and are unable to leave the building unless a vehicle is pulled up next to it. I'm guessing that's from them being created there without going through the door. Is there a way to fix that, or at least make the command not work when in a building? Here's what I have for the script.LARadio.rar Quote Link to comment Share on other sites More sharing options...
Dyson Posted July 23, 2013 Report Share Posted July 23, 2013 Sounds like you need to make it self executable, this should stop the command being triggered with right clicks or clicking on the ground, also change the priority so that things like move to will be the priority. Quote Link to comment Share on other sites More sharing options...
The Loot Posted July 23, 2013 Author Report Share Posted July 23, 2013 I've tried to put the "Self Execute" and priority lines in there, but it always seems to keep it from activating at all. I think I can manage the priority issue. For the value, lower is as it sounds? Something like this for those two (unsure if ValidTargets is needed):{PcmdRadio(){SetIcon("radio"); SetCursor("radio"); SetValidTargets(ACTOR_PERSON | ACTOR_HOUSE); SetRestrictions(RESTRICT_SELFEXECUTE); SetPriority(1);}Also, any idea on how to keep it from being useable unless the caller is completely idle, without equipment? Edit: Ok, that line worked for keeping it from being any sort of default command.{SetIcon("radio"); SetCursor("radio"); SetValidTargets(ACTOR_FLOOR | ACTOR_VIRTUAL); SetPriority(200);}And that one let's me click on the ground to deactivate the mode. Awesome.The change in priority also looks like it's solved the need to make sure they're idle, at least in some situations. I'll have to keep an eye on that. Thanks Dyson. Can't wait to see what you guys have got stuffed into v3 in the near future. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted August 2, 2013 Report Share Posted August 2, 2013 To disable the command at specific moments you will have to play with either the "bool CheckPossible" part (which greys out the command if returned false) or the "bool CheckTarget" (which can be used as an additional check) or even both. Quote Link to comment Share on other sites More sharing options...
nbrown8568 Posted August 10, 2013 Report Share Posted August 10, 2013 Sorry guys, not trying to hijack the thread, but what programming language is this game written. I have not gotten this far in school. Quote Link to comment Share on other sites More sharing options...
Axxif Posted August 10, 2013 Report Share Posted August 10, 2013 C++ I believe Quote Link to comment Share on other sites More sharing options...
nbrown8568 Posted August 11, 2013 Report Share Posted August 11, 2013 Thanks. Looking and trying to understand it. Only know a little Visual Basic. Quote Link to comment Share on other sites More sharing options...