LUA Flag decrease - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-16-2019, 05:16 PM   #1
MasterZelgadis
Member
 
MasterZelgadis's Avatar
 
Join Date: Oct 2010
Location: Ahaus, Germany
Posts: 977
Default LUA Flag decrease

How can I decrease a flag value in lua? I tried:

local newCount = tonumber(trigger.action.getUserFlag("29")) - 1
trigger.action.setUserFlag("29", newCount)

but that doesn't seem to work
__________________
"Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler."
http://www.space-view.net
MasterZelgadis is offline   Reply With Quote
Old 06-16-2019, 05:32 PM   #2
MasterZelgadis
Member
 
MasterZelgadis's Avatar
 
Join Date: Oct 2010
Location: Ahaus, Germany
Posts: 977
Default

Ah... how dumb.. it is trigger.misc.getUserFlag...
__________________
"Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler."
http://www.space-view.net
MasterZelgadis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:24 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.