Trigger Variable help

  • Thread starter Thread starter Unregistered
  • Start date Start date
U

Unregistered

Guest
Events
Unit - A unit Dies
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
For each (Integer A) from 0 to 9, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in (Units of type (Unit-type(Creeps[(Integer A)])))) Equal to True
Then - Actions
Game - Display to (All players) the text: ((Creep: + Creeps[(Integer A)]) + (Income: + Creepsincome[(Integer A)]))
Else - Actions
Do nothing


This is not working, the condition is not turning true.
 
That above was me, just registred :D

Also, if it does matter, it's the TFT editor.
 
the problem is that you are doing a pick every player action and then you go on to work with triggering units, which won't work at all. I'm guessing the code should read something like this:

Events
Unit - A unit Dies
Conditions
Actions
For each (Integer A) from 0 to 9, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Unit-type of Dying unit) equal to (Creeps[(Integer A)]))) Equal to True
Then - Actions
Game - Display to (All players) the text: ((Creep: + Creeps[(Integer A)]) + (Income: + Creepsincome[(Integer A)]))
Else - Actions
Do nothing


I'm not sure what the Creeps variable is, I'm assuming its a unit-type variable array. If it's not, then the trigger might not work.

On second thoughts, I'm not even 100% sure what the trigger is supposed to be doing, it would be nice if you could tell me. Give that new code a go however, and see if it does what you want.
 
I still can't get it to work....
This is what I have now:

Events
Unit - A unit Dies
Conditions
Actions
For each (Integer A) from 0 to 9, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Dying unit)) Equal to (Unit-type(Creeps[(Integer A)]))
Then - Actions
Game - Display to (All players) the text: ((Creep: + Creeps[(Integer A)]) + (Income: + Creepsincome[(Integer A)]))
Else - Actions
Do nothing


The 'Creeps' is a String:
Name: Creeps
Type: String array (3)
Value: Little Turtle,Crabb,jt
 
oo crud, sorry I completely forgot about you, thanks for bumping the post to remind me :)

I'm gonna try to get this code working in a map, I'll attach the map when I get it working.
 
I will love you if you do! lol.

Your doing a great job here...
 
hmm ok the problem is that (Unit-type(Creeps[(Integer A)]))
will always return absolutely nothing, meaning that the condition as you have it will never come true. The solution is to use 'name of (dying unit)' instead. Don't ask me why the unit-type 2 string conversion isn't working, I have no idea.

see my map anyway.
 

Attachments

Originally posted by Darg
hmm ok the problem is that (Unit-type(Creeps[(Integer A)]))
will always return absolutely nothing, meaning that the condition as you have it will never come true. The solution is to use 'name of (dying unit)' instead. Don't ask me why the unit-type 2 string conversion isn't working, I have no idea.

see my map anyway.
Wanna marry me? :D:D:D:D:):) THANK YOU!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top