The Trigger System

BruteBrutal

New Member
Reaction score
1
You guys really must hate me by now, the guy who refuse to take the tutorials and readings, just does it til he knows it... sorry :nuts:

But what I havnt figgured out yet is the trigger system;

1) the Melee Initialization, if I add more than 1 there every command down below seem to be doubled? Don't really get what I should have there (if any)

2) I dont get the difference between Conditions and Actions (do I need a condition for the Action to function.

3) very few of my actions are working, supposably because of my extreme knowledge of the earlier... What bugs me the most are the actions actually. Im adding alot of commands but can't really tell the difference of what's happening. Here's an example of my messed up triggerlist.

http://i52.tinypic.com/6ifxiv.png

If you look at the first part of my actions, you see that I want it to add 2 heros into my building (tavern- neutral passive unit) that is suppose to train/sell the heroes played in my upcoming badass RPG (yeeeeears ahead ;) )

Would most of all like it to be like Dota where the picked hero disappear when picked so you can't repick while dead/before reviving your hero again just because your foodlevel is 0/1 again.


TRY to answer as I'm a 13 year old girl with gum in her hair.


THANK YOU

(I also have Skype if some kind spirit would like to add and help me, my name is BruteBrutal)

Swedish or english or LITTLE LITTLE italian :)
 

NeuroToxin

New Member
Reaction score
46
1. Those are like setup type things. like setting variables, which are a bit more advanced then just starting.
2. Conditions are basically, things that have to be there, in order for the actions to happen, EX:
Trigger:
  • ConditionAction
    • Events
    • A unit is attacked
    • Conditions
    • Owner of (Attacking Unit) is an ally of Owner of (Attacked Unit) equal to true
    • Actions
    • Game - Display to (All Players) The text : You cannot attack an ally
    • Unit - Order (Attacking Unit) to Stop


3. Im not sure what you're doing in that, but heres a hint. in order for two events to occur, you have to have two triggers, one per event. Other then that it should work
 

hopy

Active Member
Reaction score
64
1) the Melee Initialization, if I add more than 1 there every command down below seem to be doubled? Don't really get what I should have there (if any)
See the Edit below... :D Remove the "Afther 23 seconds of game time event, it causes the trigger to be runned at the Loading Screen (Melee Initialization) and again afther 23 seconds. Just the Melee Initialization is enough.

Melee Initialization is a trigger that triggers during the Loading Screen and it's usualy just used for setting some Variables and options, I'd say it'd be best to place stuff like the Leader Board in a different, second, trigger, like afther 23 seconds or afther a dialog button.

2) I dont get the difference between Conditions and Actions (do I need a condition for the Action to function.
An Event is when a trigger triggers, so like "When a unit casts an ability", than when a unit casts something the trigger will fire.
A Condition is a way to make sure that the event doesn't trigger for every ability, attack or unit. It's basicly an Boolean True/False.
So you add a condition like "Ability being cast is Animate Death", and when the trigger fires (the event is triggered) than it will check: 'Is it Animate death?' and if that's True the trigger will fire, and if it's false the trigger wont do anything.
An Action is what the trigger is supposed to do basicly. So you add something like "Give a massage"...
So what you'd get with this strange example is: [HANDWRITTEN!]
Trigger:
  • Strange Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Animate Death
    • Actions
      • Game - Show (all players) the massage (Hello, I like making maps)

So what happes here?
- When a unit casts a spell this trigger will start.
- The trigger will check "Is this Animate Death?".
- If the ability is Animate Death it will do (actions)... in this case show a weird massage.

3) very few of my actions are working, supposably because of my extreme knowledge of the earlier... What bugs me the most are the actions actually. Im adding alot of commands but can't really tell the difference of what's happening. Here's an example of my messed up triggerlist.
First of all at the bottom of the picture I see a "Melee Game - blahblah" meaning that something isn't right in that action and the trigger will be disabled.
With the LeaderBoard make sure to also Show it and add stuff, else it'll be pretty pointless.
And I'm not sure about the other things, haven't worked with those myself. Could be that the building isn't able to ... do what you're trying to do.

If you look at the first part of my actions, you see that I want it to add 2 heros into my building (tavern- neutral passive unit) that is suppose to train/sell the heroes played in my upcoming badass RPG (yeeeeears ahead ;) )
Since you're doing all this in the Map Initialization, which is a trigger that runs at the start of the map (loading screen), couldn't you just add those heroes to the building itself in the Object editor instead of doing it by triggers?

But heres a hint. in order for two events to occur, you have to have two triggers, one per event. Other then that it should work
Not 100% true, as long as there ain't any Conditions that would make it imposible the Trigger would trigger for both the Events. So the trigger would run at the Loading screen as well as afther 23 seconds of game time. This however is completely useless and just the "Melee Initialization", remove the 23 seconds of Game time. This (the two events) is also the reason why your Map Initialization trigger actions were doubled.
=====/EDIT====
 

BruteBrutal

New Member
Reaction score
1
Wow thanks, so now for example the hard thing is to know what Conditions to use..

Since I cant figure out how to make hero disappear in the building after it's picked I tried to go

Map initialization

?

Player - Limit training of Heroes to 1 for Player 1 (Red)


But it didnt work, at least not without Condition.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Since I cant figure out how to make hero disappear in the building after it's picked I tried to go

> Map initialization

Hmm. You want to make a hero disappear after it's been picked (that's what an event is: something happens, and you want something to happen after that)

But as an event you state Map Initialization, which means it will happen at the beginning of the game. Obviously you would want...

Trigger:
  • Events
    • Unit - A unit sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to YOUR-HERO
    • Actions
      • Player - Limit training of Heroes to 1 for (Owner of (Triggering unit))


Or any other way to prevent the training of that hero, or another hero.
 

SanKakU

Member
Reaction score
21
was that a metaphor about a girl with gum in her hair?

you are early enough in your learning apparently, if you'renot joking, that is...

that you need to not only, screenshot your stuff, i guess...that's good...
but then state clearly what you tried to do.

for every line.

you could use comments in the screenshots, you know...

anyways...map init and time of day all have the same actions...so all those actions run at map init and that 23 time of day.

you might want to make a separate trigger for the two events...
or...you might be trying to set the time of day at map init to 23. idk what you want to do. that's just the first 2+ lines where it looks like you mess up. and you need to clearly explain all that you're trying to do.

and for all i know you want to make those actions run at 23 seconds game time. just don't know.
 

BruteBrutal

New Member
Reaction score
1
> Since I cant figure out how to make hero disappear in the building after it's picked I tried to go

> Map initialization

Hmm. You want to make a hero disappear after it's been picked (that's what an event is: something happens, and you want something to happen after that)

But as an event you state Map Initialization, which means it will happen at the beginning of the game. Obviously you would want...

Trigger:
  • Events
    • Unit - A unit sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to YOUR-HERO
    • Actions
      • Player - Limit training of Heroes to 1 for (Owner of (Triggering unit))


Or any other way to prevent the training of that hero, or another hero.


Hero Tavern
Events
Unit - A unit Sells a unit
Conditions
((Unit-type of (Sold unit)) is A Hero) Equal to True
Actions
Player - Limit training of Heroes to 1 for Player 1 (Red)


This is my current trigger and it doesnt work, to try it out I've made my house that should be the hero-picking house both sell units and train heros, got 1 of both my heros in each SELL UNIT and TRAIN HERO.


1 of them requires 1 Food so that way you can only train ONE, but you can still pick some other when your hero is dead.
The other one requires nothing to pick but since the trigger still doesnt work I can pick how many heros I want.

How I really want it to look is a heropool in the house exactly like in Dota. No number next to the hero (as in sold unit) but I dont know how to make a neutral building TRAIN HEROS it only exist units that SELL UNITS in Neutral buildings.
Also I want to limit the HERO to 1 for all players with a trigger.

Or actually... you should as in an ORPG be able to pick any hero, but when player 1 pick a hero all picking options should disappear. So only the revive icon remain if he dies. But all heroes should be able to pick hero before reviving. Should I make a separate building and spawn the picked hero at the start location instead to make it easier perhaps. If I have the revive and picking hero buildings at different locations?

Thanks again guys... and yes the 13 year old girl thing was more of a self ironic joke. :)
 

BruteBrutal

New Member
Reaction score
1
Herolimit
Events
Unit - Brute's Tavern 0011 <gen> Sells a unit
Conditions
(Unit-type of (Sold unit)) Equal to (Unit-type of (Sold unit))
(Unit-type of (Sold unit)) Equal to Joline of Arrathas NOT ACTIVE
Actions
Player - Limit training of (Unit-type of (Sold unit)) to 1 for Player 1 (Red)
Player - Limit training of (Unit-type of (Sold unit)) to 1 for Player 2 (Blue) NOT ACTIVE
Player - Limit training of (Unit-type of (Sold unit)) to 1 for Player 3 (Teal) NOT ACTIVE

This worked, BUT once the hero is dead he can still repick into any unpicked hero since foodlevel goes from 1/1 to 0/1 while dead.

How do I solve that?
 

Sim

Forum Administrator
Staff member
Reaction score
534
http://world-editor-tutorials.thehelper.net/herotavern.php
This should help you setting everything out.

In short, the function you seek is Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by PLAYER

BruteBrutal, please wait 24 hours before bumping your thread.

> don't bump your topic 3 times without wait at least 12hours

And let the moderators do their job. :p
 

BruteBrutal

New Member
Reaction score
1
First of all; I'm sorry about that I'm just really exited about my newfound hobby :D

Second; that command made the same thing happen, but when a hero DIE and when I should REVIVE the hero in the TAVERN a player can still pick an UNPICKED HERO since Foodlevel then is 0/1.

So I figure either I have to have a pickingspot and make picked hero spawn far away so the Revive-building is empty... OR

Somehow to create a pickingphase and make the TAVERN clear all Heroes after the pickingphase is done, and it will be empty for ONLY REVIVE.

What do you think is my best option?

Thanks,
 

NeuroToxin

New Member
Reaction score
46
What you could do, is either give the heroes lumber cost, then not give them any lumber after they pick one. or the same thing with gold, But, you could also create a unit anywhere, give the unit the locust ability, remove its model, then just give it one food cost, but make all the heroes 0 food cost, but this is when the hero is picked
 

Sim

Forum Administrator
Staff member
Reaction score
534
Try replacing your triggers with the ones in the link I provided. (Just disable yours so you don't lose them)
 

BruteBrutal

New Member
Reaction score
1
Wow nice solution, if I use wood instead its simply consume 1 wood at first and make it impossible to buy anymore since you can't collect anymore wood anyway.

Thanks for the help.

I'm too proud and like to find answers and solutions my own way with some help, I DON'T like to copy others work and use. Its prestige you know and you dont learn nothing from it either to be honest. Thanks for the help, now my heropicking is okay. It's still unit isntead of train hero but its fine for now.
 

SanKakU

Member
Reaction score
21
for only one hero, there are a few different ways you can do it. you could make a unit be recognized as an altar(make sure all the heroes require altar), and remove it when the player selects a hero.

another is to make all the heroes part of the gameplay constants so a second hero gonna require a keep, a third requires a castle, etc...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top