Clan TMMM
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The official site of Clan TMMM
 
HomeHomeSearchLatest imagesRegisterLog in


Latest topics
» Kevkevqaz is back
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby Eat_bacon_daily Wed Feb 22, 2023 7:22 pm

» Hey whats up
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby seankly Tue Feb 04, 2020 10:32 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeby Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap26%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 26% [ 8 ]
Warcraft 3
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap35%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 35% [ 11 ]
League of Legends
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap19%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 19% [ 6 ]
World of Warcraft
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap0%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 0% [ 0 ]
Diablo 2
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap0%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 0% [ 0 ]
No games at all
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap10%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 10% [ 3 ]
Other game not listed
Jass TriggerAddAction to Make Actions At Runtime I_vote_lcap10%Jass TriggerAddAction to Make Actions At Runtime I_vote_rcap
 10% [ 3 ]
Total Votes : 31
Transparency

 

 Jass TriggerAddAction to Make Actions At Runtime

Go down 
3 posters
AuthorMessage
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSat Jul 30, 2011 11:50 pm

How would I convert string input into a Jass Trigger using TriggerAddAction?

By that I mean, how would I convert the string type to the function type?

Thanks!

-Oreo
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSun Jul 31, 2011 12:27 am

What are you trying to do

TriggerAddAction takes a trigger and a function
A string is a line of text, where as a function is a bunch of code

Use the function name in TriggerAddAction



Are you trying to make triggers as the map runs
You cant do that, at least not directly like you seem to be asking for
Just make 2+ functions (or triggers) and use an if statement to pick which runs
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSun Jul 31, 2011 1:13 am

Well.. Is it possible to take an array of strings, and convert it to the code data type?

Because TriggerAddAction is defined as follows:

native TriggerAddAction takes trigger whichTrigger, code actionFunc returns triggeraction

All I am trying to do is make a Type Casting function that takes string s and returns code c

function S2Code takes string s returns code c
return s
return null
endfunction

Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSun Jul 31, 2011 2:20 am

Type casting like that doesnt work anymore, it was patched awhile ago to prevent people from running malicious code

They patched in an equivalent, called hashtables/handles, but not for what your trying to do
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSun Jul 31, 2011 9:14 am

Is there any other way then that you know of? I completely forgot that they got rid of the return bug Crying or Very sad
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeFri Aug 05, 2011 11:50 am

i was wondering this awhile ago too

you used to be able to cast code into integers and back again
could do some really cool stuff with it too

but yeah, too much power for the average map maker
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitimeSat Aug 06, 2011 12:10 am

hmm... maybe time to use the preload bug :]

maybe edit a wc3 file or 2 here and have it run during the map to allow certain things :]

or was that patched too?
Back to top Go down
Sponsored content





Jass TriggerAddAction to Make Actions At Runtime Empty
PostSubject: Re: Jass TriggerAddAction to Make Actions At Runtime   Jass TriggerAddAction to Make Actions At Runtime I_icon_minitime

Back to top Go down
 
Jass TriggerAddAction to Make Actions At Runtime
Back to top 
Page 1 of 1
 Similar topics
-
» Need Jass Help
» JASS HELP PLZ!
» Jass Help
» Hmm Jass...
» Jass broke my wc3...

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: