• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Forms on Jass

Status
Not open for further replies.
Level 1
Joined
Jun 24, 2020
Messages
3
hello everyone. i want to make next skill:

if someone know map : Dbz tribute lunatic.
Goku has skills(forms) , when he has lvl 30, he has SS(when he texted ss, he has special effect on him, he turned SS) lvl 60 - when he texted ss2 he has ss2, lvl 80 or etc ss3 and more.
when u text r, u have back to your previuos form. also when u texted previous SS's, for example if youre in ss3, and if u texted ss, u have go back in ss and delete your ss3 effect. i want that type of skill and i cannt make condition for this, can someone please help me? i want to do this for 3 years, 3 years ago i started learn jass and when i cannt do this, i quit jass, now im back from 3 years, and also cannt do this :D maybe someone has spellpack with it or smthng? (im in jass almost 1 week, 3 years ago i studied it for 1 month)
 
Hello, good to see you came back and try again. :thumbs_up:
At first, I'm not sure JASS is required if you feel rusty. GUI might do here perfectly fine, too, as first guess. I would use pseudo code in example, but once there's some base we could always go further to JASS.

It can be maybe solved with combination of
  • Events Tyes exact message => to catch when player types "r", "ss" , ... ( make 1 trigger for each string event )
  • If-blocks ( interger comparison ) => to check level of unit
  • Special Effect - Destroy/Add Effect => to attack respective effect to unit
As help, it would make it simpler if units are directly binded to player number, of who owns them. Using a player array for example.
Unit[1] = unit for player 1
Unit[2] = unit for player 2
...
so at event when "A player types message" we can use Unit[PlayerNumberOf(TriggeringPlayer)] and automatically have the player's unit.

Same way it's good to store a created special effect into SpecialEffect[array] variable, again using player number as index. With this, we can easily destroy it at cases when player types "r" or alike.

If you want one player to have many units, and work with "currently selected unit", then we should go an other way and use a system called UnitIndexer. But only as side note, as it might be not needed.
 
Level 1
Joined
Jun 24, 2020
Messages
3
Hello, good to see you came back and try again. :thumbs_up:
At first, I'm not sure JASS is required if you feel rusty. GUI might do here perfectly fine, too, as first guess. I would use pseudo code in example, but once there's some base we could always go further to JASS.

It can be maybe solved with combination of
  • Events Tyes exact message => to catch when player types "r", "ss" , ... ( make 1 trigger for each string event )
  • If-blocks ( interger comparison ) => to check level of unit
  • Special Effect - Destroy/Add Effect => to attack respective effect to unit
As help, it would make it simpler if units are directly binded to player number, of who owns them. Using a player array for example.
Unit[1] = unit for player 1
Unit[2] = unit for player 2
...
so at event when "A player types message" we can use Unit[PlayerNumberOf(TriggeringPlayer)] and automatically have the player's unit.

Same way it's good to store a created special effect into SpecialEffect[array] variable, again using player number as index. With this, we can easily destroy it at cases when player types "r" or alike.

If you want one player to have many units, and work with "currently selected unit", then we should go an other way and use a system called UnitIndexer. But only as side note, as it might be not needed.
Thank u very much for reply as first.

Yeah i asked some people in discord before posted it here, and i guy told me to use pseudo code, and other guy also told to use gui, but i want my map excatly on jass because i dont want to use many types of codding, also pseudo code is far for me, i dont know why but i just like jass.
Can u please give me example of how to text correctly the condution on jass ? I know how to make this skill in theory, but dont know how to text it in condition in right way.
 
Pseudo code is not a real language, it's just for showing how it could functionally could look like. Doing in JASS/GUI can do same, but then you must follow exact pattern of GUI/JASS language. So people use just normal text/pseudo code sometimes, only to give examples.

Well, .... you need to do something at least. If you don't even know how to make a condition or action in JASS, it makes no sense you say you don't want GUI.
Or try GUI, or first try to learn in JASS, that you can do something at least. There's a difference in asking for help in a trigger problem or asking to teach you JASS.

Here are many links for JASS: HelpMe
 
Status
Not open for further replies.
Top