ID:271870
 
I've got a problem with the macros...alot of people do. i've read a few of the topics trying to figure out if they could solve my problem but they haven't.

anyway im updating my game using version 4.0 and i added a new skin to it. i used this code to get the macros to work

mob
verb
ALT()
set hidden=1
if(winget(usr,"input","command=\"!.alt\";"))
winset(usr,"input","command=\"\"")
else
winset(usr,"input","command=\"!.alt\";" )


but it failed, every time i try to use a macro, the text just inputs right after the ".alt"

someone please assist me.
I don't think you're using winget() right. winget() returns the value of the parameter, not if the parameter and value you specify is true or false.

You don't need semicolons at the end of your winget and winset. Put a space after the .alt and it will work.
In response to Kaiochao2536
no, it didnt work...
In response to Jose SN.
What problems are people having with macros?
In response to Obs
i explained it in my first message
In response to Jose SN.
No but you said a LOT of people had problems with macros?

They seem pretty straight forward. Or are the people with problems trying to convert the game from 3.0 to 4.0?
In response to Obs
my problem is that when i try to use macros, the .alt turns into ex: ".altasdf"
I think instead of using ".alt" you need to include another space, making it ".alt ".

Also, you shouldn't make a hidden "ALT" verb, as it's ugly. You can perform the same action you want in the interface directly by changing it's command.

The following command for your input button (called altButton) should suffice:

input.command="!.alt " ? altButton.is-checked=true input.command="" : altButton.is-checked=false input.command="!alt "

-- Data