"Evolve a unit"

2fat2move

New Member
Reaction score
0
Hey guys, I'm actually working for a Digimon RPG and want to evolve my Koromon to a Agumon. I'm actually trying it with triggers and variables. In the picture you can see my triggers, which are not working. :(

(Level = 25)

Variablename: "Level"
"level" increase +1 each time a hero level up. (Works fine)

((Unit-type of (Triggering unit) equal InTraining_Digimon[(Integer A)]
"InTraining_Digimon" is a array unit-type with

[1] = Koromon
[2] = Tsunemon
[3] = etc.

"Rookie_Digimon" is a array unit-type with

[1] = Agumon
[2] = Gabumon
[3] = etc.

If I only do that trigger without(!) " ((Unit-type of (Triggering unit) equal InTraining_Digimon[(Integer A)]" my Koromon reaches level 25 and get replaced by (actually) Agumon AND Gabumon. Hopefully someone can help me here. Already thanks for your posts. :)

If you need more informations, tell me please. :)
 

Attachments

  • Scripts 2.png
    Scripts 2.png
    9.7 KB · Views: 217

afisakov

You can change this now in User CP.
Reaction score
37
try it this way:
Trigger:
  • digivolve
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Level of (Triggering unit)) Equal to 25
    • Actions
      • For each (Integer A) from 1 to 18, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to in_training_digimon[(Integer A)]
            • Then - Actions
              • Unit - Replace (Triggering unit) with a rookie_digimon[(Integer A)] using The old unit's relative life and mana
            • Else - Actions

Referencing "For Loop Integer A" does not work properly if you do it outside the loop. Also I do not think you need a separate variable to record the unit levels.
P.S. This will replace the koromon with a lvl 1 augumon, if you want him to be lvl 25 you need to set him to such in the trigger.
 

2fat2move

New Member
Reaction score
0
So 1st... Where I can find "(Level of (Triggering unit))"? I'm actually suprise there is something like that 'cause I was watching for something like that and couldn't find it. 'Cause of that I did a variable for the level. :p
 

Solu9

You can change this now in User CP.
Reaction score
216
It's an Integer condition

Trigger:
  • Trigger 001
    • Events
    • Conditions
      • (Hero level of (Triggering unit)) Equal to 79846
    • Actions
 

2fat2move

New Member
Reaction score
0
"It's an Integer condition" -> open "integer comparison" -> instantly find it. -.-
That Editor is hating me hard. :confused:

Edit: It works. :) Actually my Digimon the same level they r replaced, cause they r not created new. So if my Koromon and Tsunemon evolve at level 10, Agumon and Gabumon got the same experience like the replaced units. Love you guys. Thanks. :rolleyes:

Edit #2: Btw, don't laugh about me. Digimon is awesome! ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top