• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Random (Number) (GUI)

Status
Not open for further replies.
Level 1
Joined
Apr 22, 2019
Messages
5
Hello,

I have made a working random hero trigger, my issue with it though is that i want to disable hero picks with it aswell.

Let’s say i random a Paladin Hero , if a paladin hero is created i want to somehow make the random unable to choose a paladin again (for the rest of the game).

Is this possible?

Like just getting a random number that can’t be the same randomer number again will make me able to fix this.


PS: i use a selection circle (region enter) system thingy

Thanks in advance
 
Level 1
Joined
Apr 22, 2019
Messages
5
Nice well i got the random pick only once to work after some time following the triggers in that post, but now the only issue i have left is somehow want that a specific number removed from the randomizer aswell if someone picks one of those heroes manually, can i do this somehow? :p
 
Last edited:
Level 2
Joined
Apr 1, 2019
Messages
156
I believe you can change "Interger" equal to a number value rather than (random number between 1 and numbermax)

Say you have hero paladin set to 3 in your unit array, then.

Event:
Unit sells a unit

Condition:
Sold unit equal to Paladin

Action:
Set Interger = 3
Set randnumber = numbers[interger]
Set numbers[Integer] = numbers[numbermax]
Set numbermax = (numbermax - 1)


Btw sorry I don't have my computer right now can't post these triggers properly.
 
Level 1
Joined
Apr 22, 2019
Messages
5
After doing what you wrote here in my specific hero pick triggers it seems to work based on the few test runs i had time to do today. So i would assume it works as intended :) , thanks alot !
 
Status
Not open for further replies.
Top