(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > Triggers & Scripts

Triggers & Scripts Discussions regarding GUI triggers & JASS/AI scripts may be found here. Please review the » JASS Tutorials » Trigger Tutorials

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2008, 01:26 AM   #1 (permalink)

User
 
Join Date: Nov 2008
Posts: 4

de1337 is an unknown quantity at this point (0)


Detect Blocking in a TD

I'm trying to make TD with strictly mazing, but have come across a problem with detecting blocking.

The only solution I can think of is to detect when a creep stops moving because it is unable to follow along a maze. This trigger actually works, but the unit typically follows the maze up until the dead end, runs back a short distance, returns to the dead end, and then it is finally recognized by the trigger. I'd like to find a way to detect the dead end on the spot so there is no build up of creeps going back and forth.

Thanks in advance.

Blocking
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set tempStuckCreeps = (Units owned by Neutral Extra matching (((Current order of (Matching unit)) Not equal to (Order(move))) and (((Matching unit) is alive) Equal to True)))
Unit Group - Pick every unit in tempStuckCreeps and do (Actions)
Loop - Actions
Set tempPoint = (Position of (Picked unit))
Set tempUnits = (Units within 100.00 of tempPoint matching (((Matching unit) is A structure) Equal to True))
Set tempPlayers = (Player group((Player((Custom value of (Picked unit))))))
Unit - Explode (Random unit from tempUnits)
Game - Display to tempPlayers for 0.50 seconds the text: Blocking detected!
Custom script: call DestroyForce( udg_tempPlayers )
Custom script: call DestroyGroup( udg_tempUnits )
Custom script: call RemoveLocation( udg_tempPoint )
Unit Group - Remove (Picked unit) from tempStuckCreeps
Custom script: call DestroyGroup( udg_tempStuckCreeps )
de1337 is offline   Reply With Quote
Old 11-18-2008, 11:23 PM   #2 (permalink)

User
 
Join Date: Nov 2008
Posts: 4

de1337 is an unknown quantity at this point (0)


Any input?
de1337 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem With Blocking Sceight753 World Editor Help Zone 5 05-29-2008 11:45 PM
Tower Defense Blocking Isthisnametaken World Editor Help Zone 3 04-17-2008 02:25 AM
blocking out the minimap Gallin World Editor Help Zone 1 03-11-2008 08:37 AM
TD blocking Need_O2 World Editor Help Zone 4 09-28-2007 08:44 PM
Blocking Ability johannesr World Editor Help Zone 2 06-09-2007 04:29 PM

All times are GMT. The time now is 01:08 PM.






Your link here 
Mortgage Calculator | Kung fu art of fighting | Debt Consolidation | Advertising | Guitar Lessons
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle