Spawn Trigger Help

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

Moderator: Cheaters

Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Spawn Trigger Help

Post by Black-Hole »

Ive been trying to figure out away to make a spawn trigger that works like this.

Code: Select all

Spawn
    Events
        Player - Player 1 (Red) types a chat message containing -spawn as A substring
    Conditions
        (Entered chat string) Equal to (Substring(-spawn, 7, 10))
    Actions
        Unit - Create ??? Footman for Neutral Hostile at (Random point in Region 000 <gen>) facing Default building facing (270.0) degrees
Some how i want it to create the number of units that you use in the substring. How can i make a trigger like that?
User avatar
tru_power22
Old Wrinkly Member
Posts: 271
Joined: January 12th, 2008, 4:42 am
Title: Re-R-Re-Re-Remix
Location: Canada EH?

Re: Spawn Trigger Help

Post by tru_power22 »

What your looking for is:

Code: Select all

Spawning Shit
    Events
        Player - Player 1 (Red) types a chat message containing -spawn as A substring
    Conditions
    Actions
        Unit - Create (Integer((Substring((Entered chat string), 7, 10)))) Footman for Player 1 (Red) at (Where ever)) facing Default building facing (270.0) degrees
The commands would look like -spawn 10

This is a very basic command.
Contact me on WC3 Killing_Spree22, I'm at US west!

To avoid being a noob read this: http://forum.wc3edit.net/everything-els ... t4579.html
This is the official site for team UKS, it's also my home page - http://www.TeamUks.tk

I AM DEAD, I WILL NO LONGER BE POSING HERE. BEEN FUN WITH YOU ALL.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Spawn Trigger Help

Post by Black-Hole »

Thx for the trigger it works great
User avatar
tru_power22
Old Wrinkly Member
Posts: 271
Joined: January 12th, 2008, 4:42 am
Title: Re-R-Re-Re-Remix
Location: Canada EH?

Re: Spawn Trigger Help

Post by tru_power22 »

NP but it leaks a location...
Contact me on WC3 Killing_Spree22, I'm at US west!

To avoid being a noob read this: http://forum.wc3edit.net/everything-els ... t4579.html
This is the official site for team UKS, it's also my home page - http://www.TeamUks.tk

I AM DEAD, I WILL NO LONGER BE POSING HERE. BEEN FUN WITH YOU ALL.
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Spawn Trigger Help

Post by weirdone2 »

As far as I can see it doesn't leak a location just yet. It will though if he puts what he plans to put in it, Random point in Region 000 <gen>. ;/ And to fix that all he'd have to do is define a variable as Random point in Region 000 <gen> and then destroy the location and null the var after use.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Spawn Trigger Help

Post by Aero »

That def leaks a location.
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Spawn Trigger Help

Post by weirdone2 »

how does this leak a location?

Code: Select all

Spawning Shit
    Events
        Player - Player 1 (Red) types a chat message containing -spawn as A substring
    Conditions
    Actions
        Unit - Create (Integer((Substring((Entered chat string), 7, 10)))) Footman for Player 1 (Red) at (Where ever)) facing Default building facing (270.0) degrees
A location hasn't even been specified yet its where ever he wants to make it which he could put a global ter if he wanted to so do tell me what I'm missing.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Spawn Trigger Help

Post by Aero »

If it's a global you're fine.