wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-31-2006, 07:37 AM   #1
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default Location Leaks?

I'm unsure whether this trigger has leaks or not. Since I use Random Point in Rect(bla) in many triggers, this is only one of them, since it would apply to all anyways.
Trigger:
Wave 1
Collapse Events
Time - StartTimer expires
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to NumberOfPlayers, do (Actions)
Collapse Loop - Actions
Unit - Create 9 Alien Spawn 1 for Player 12 (Brown) at (Random point in Alien Spawn <gen>) facing Default building facing (270.0) degrees
Unit Group - Order (Units in Alien Spawn <gen>) to Attack-Move To (Random point in Spawn Attack Target <gen>)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Get the event that fired the trigger) Equal to Timer Expires
Collapse Then - Actions
Trigger - Add to (This trigger) the event (Time - Every 30.00 seconds of game time)
Set Level = (Level + 1)
Collapse Else - Actions
Do nothing

I'm pretty sure the custom text would be RemoveLoc(...) but I'm not positive for this. Anyone know? Thanks.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-31-2006, 07:50 AM   #2
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

You can decide for yourself quite easily. Convert the trigger to custom text, and find the function which generates the random point. Then look it up in Blizzard.j, and you should find something which clearly does or does not create a location.

In this case though it clearly creates a new location as the random point is not something that exists beforehand.
__________________
PipeDream is offline   Reply With Quote
Old 08-31-2006, 11:29 AM   #3
aquilla
User
 
aquilla's Avatar
 
Join Date: Mar 2003
Posts: 217

Submissions (1)

aquilla will become famous soon enough (71)aquilla will become famous soon enough (71)aquilla will become famous soon enough (71)

Send a message via MSN to aquilla
Default

You had a group leak as well, the code below should take care of things. Don't destroy the tempgroup as it's continously used by the create unit thingy
Trigger:
...
Set temploc = (Random point in Alien Spawn <gen>)
Unit - Create 9 Alien Spawn 1 for Player 12 (Brown) at (temploc) facing Default building facing (270.0) degrees
Custom script: call RemoveLocation(udg_temploc)
Set temploc = (Random point in Spawn Attack Target <gen>)
Custom script: set udg_tempgroup = bj_lastCreatedGroup
Unit Group - Order (tempgroup) to Attack-Move To (temploc)
Custom script: call RemoveLocation(udg_temploc)
...
__________________
You don't care what I've listened to lately
but I'll tell you anyway,
because that's the only thing I'm good at.
aquilla is offline   Reply With Quote
Old 08-31-2006, 03:27 PM   #4
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Oh, Thanks Aquilla. I'll put that through all my triggers, it looks good. +rep
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:48 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services