• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Integer Trigger Event Problem!

Status
Not open for further replies.
Level 5
Joined
Oct 7, 2005
Messages
102
Hey guys, I'm trying to figure out how to make a trigger where it has some kind of event that happens when a integer variable is higher/equalto/lower than another integer variable.

Please tell me if this is possible, or if there are any easier alternatives!

Thanks guys.
 
I'm sorry I didn't mention it, some of my triggers only work with integers, like a leaderboard trigger I have, and I can't set reals to integers and vice versa.

So it has to be integer unless someone can suggest an alternative to that?
 
When does the integer increase? If you have a specific trigger that increases that integer, in the same trigger, make an Integer comparison,
  • If (All conditions are true) then do (Actions) else do (Actions)
  • If - Conditions
    • (Integer1) Equal to Integer2
  • Then - Actions
    • //Do actions here
  • Else - Actions
    • Set Integer1 = (Integer1 + 1)
Something like this.
 
Well this is the problem, the events in this case become too many and it becomes to complicated and removes the possibility of something else I'm trying to do.

So it has to be a single event where one integer becomes (whatever) than the other.

I'm trying something else I had an idea for after what Watermelon said. Though I'm not confident if It'll work. I'll update soon.
 
Okay I've tried changing some things, but I'm trying to do the event Watermelon did with the Real (whatever to) the other real. But for some reason it won't let me choose a second real variable??
 
Okay well, I'm trying to make a trigger that, when the population of your units reaches a number equal to or greater than your living space (Integer updated with each new home)
Then it disables the ability to produce more people untill you build more homes.
 
Okay I'm trying the conversion thing, but it wont let me choose a integer variable now?! The options grayed out saying there are no generated variables, but I have loads of integer variables!
 
This is the event I'm trying to make...

"Game - RealPopUsed1 becomes great than or equal to IntegerPopCap1"

But it wont let me choose the integer variable with the conversion or anything.
 
Can you put that event into a map? I don't know how to create it.


...Sometimes I really hate all this complicated nonsense.


Edit: Wait no scratch that!!! I found it out, please forgive me.
 
Status
Not open for further replies.
Back
Top