Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Hatsune Miku

Chat commands

Recommended Posts

I've been trying to figure out how to script up a locking / unlocking vehicle script that triggers on a specific unit's command via any of the chat channels, rather than using the menus or radio mediums, but I've not a clue on how to get it to read off the chat command. Any ideas?

Share this post


Link to post
Share on other sites

Anyone? :<

In case it wasn't clear, if any player typed in direct chat:

!unlock M1A1

It would read it off and trigger the script to unlock the tank. I just need an example of the bit where it reads and recognizes a particular string from any of the channels.

Share this post


Link to post
Share on other sites

I'm not sure if thats even possible, I havent seen any script commands that would do that, why not use an action when the player is near the tank? Surely what would be easier.

Share this post


Link to post
Share on other sites

It would, except the case I'm trying to do is have the HQ CO have control over what assets he wishes to authorize for the units under him. If the HQ is out and about in the battle, it would require him to return to base and unlock it himself.

Using this method allows command from anywhere on the map and doesn't use the scroll menu, which can get quite cluttered depending on what other addons you might use.

The scripting for it would be similar to how the hash commands are read off (#login, #vote kick, etc), but when I looked in there, I uh... ended up confused.

Edit: 'there' being after you unpbo addons/ui.pbo and look under ui/scripts/dedicatedServerInterface.sqf

Edited by Hatsune Miku

Share this post


Link to post
Share on other sites

Well to be honest I havent even looked at the DSI stuff, that could work but I'm not in a position to root around in Arma 2's files. You could also try and create a dialog but thats probably out of your scope at the moment. Ill have a look at that DSI stuff when I get home and report if I find a way.

Share this post


Link to post
Share on other sites
It would, except the case I'm trying to do is have the HQ CO have control over what assets he wishes to authorize for the units under him. If the HQ is out and about in the battle, it would require him to return to base and unlock it himself.

Using this method allows command from anywhere on the map and doesn't use the scroll menu, which can get quite cluttered depending on what other addons you might use.

The scripting for it would be similar to how the hash commands are read off (#login, #vote kick, etc), but when I looked in there, I uh... ended up confused.

Edit: 'there' being after you unpbo addons/ui.pbo and look under ui/scripts/dedicatedServerInterface.sqf

DedicatedServerInterface.sqf is the new UI dialog they added which basically just calls the chat commands (#login/#kick/etc). The chat commands themselves are handled by the engine code I reckon. Certainly can't find any mention of them anywhere else.

Share this post


Link to post
Share on other sites
DedicatedServerInterface.sqf is the new UI dialog they added which basically just calls the chat commands (#login/#kick/etc). The chat commands themselves are handled by the engine code I reckon. Certainly can't find any mention of them anywhere else.

Oh dear, that slipped my mind. Makes a whole lot of sense now.

I suppose I'll be forced to use a dialog or radio if I can't find a way. Was hoping to use it for other stuff too like view distance and terrain settings on the fly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×