Need help making a triggered spell

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

patrick-the-bomb
Senior Member
Posts: 165
Joined: February 25th, 2008, 2:56 am
Title: Sir Awesome

Need help making a triggered spell

Post by patrick-the-bomb »

Unlike most of you guys, I don't like just putting in the cheat codes for maps. I like to go in, and rig a character or something. lol

I'm trying to copy that move juxtapose from dota, and put it into a version of Enfo's.

Except I'm trying to make it so that 35% of the time, when my hero is attacked, an image of it will spawn for 20 seconds.

Idk how this would work. I got most of it (i think) down. I just don't know how to set it to 35% of the time, and how to make the images.

I looked around, and figured out to have a dummy unit cast the spell. SO i made a little peasent have this item i made to do it, but that wont work either, and idk why.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Need help making a triggered spell

Post by Xantan »

set x = random number from 1 to 100

if x = 1-35, spawn one mirror for x at x
patrick-the-bomb
Senior Member
Posts: 165
Joined: February 25th, 2008, 2:56 am
Title: Sir Awesome

Re: Need help making a triggered spell

Post by patrick-the-bomb »

Ok, so idk if I got this across too well on tha last post, but I'm kinda new at the whole WE thing.
If I went in, would I find that pretty easily?
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Need help making a triggered spell

Post by Bartimaeus »

Probably not, :lol:

Here's a more thorough walk-through:

Firstly, open trigger editor. Then go to variables, (yellow X on top), and create an integer, (default 0).

Now create a trigger, (your events & conditions), and then search for Set, and select Set Variable, and pick the variable aforementioned.

What you set it to: Math - Random Number, (between whatever and whatever).

Next, search for If; select If/Then/Else - Multiple Functions.

Create a condition; Integer Comparison, choose your variable, and then click on the number, (default 0, I think), and pick Math - Random Number, and x through y, (example, 3 through 7). Then have your functions in Then, and if it doesn't equal that, well, just do this entire thing over again, and just pick a different x through y.

I think this is a little confusing for a beginner, :lol:
patrick-the-bomb
Senior Member
Posts: 165
Joined: February 25th, 2008, 2:56 am
Title: Sir Awesome

Re: Need help making a triggered spell

Post by patrick-the-bomb »

Thx bro.

Xantan said some like when x = w/e spawn one mirror of x at x. where do i get this spawn one mirror of x at x?

i think i could figure it out, but any help would be greatly appreciated.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Need help making a triggered spell

Post by Xantan »

unit --> create unit --> with expiration timer, or create copy of unit... ummm how do they do mirror image? Just use those images...


=/
patrick-the-bomb
Senior Member
Posts: 165
Joined: February 25th, 2008, 2:56 am
Title: Sir Awesome

Re: Need help making a triggered spell

Post by patrick-the-bomb »

Lol, thanks guys. I know I probably seem like an idiot, but whatever.
Thanks for all the help. :D
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Need help making a triggered spell

Post by Bartimaeus »

Nah, should've seen me trying to make my first map. Didn't even understand what regions were, :P
patrick-the-bomb
Senior Member
Posts: 165
Joined: February 25th, 2008, 2:56 am
Title: Sir Awesome

Re: Need help making a triggered spell

Post by patrick-the-bomb »

Haha, takes time to be good at stuff. I'm just kinds tryig to figure out how all if the GUI triggers work and whatnot.