[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > JASS Resources


JASS Resources Find JASS code snippets and functions here or write your own and post it on the Submissions sub-forum.

Reply
 
Thread Tools
Old 02-12-2012, 04:13 AM   #46 (permalink)
Registered User jim7777
User
 
jim7777's Avatar
 
Join Date: May 2009
Posts: 495
jim7777 is on a distinguished road (76)jim7777 is on a distinguished road (76)
does this snippet check if the path or line between two points are blocked?

or just a radius around the unit is being checked?
__________________

Map's Forum
jim7777 is offline   Reply With Quote
Old 02-12-2012, 04:38 AM   #47 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Quote:
does this snippet check if the path or line between two points are blocked?

or just a radius around the unit is being checked?
Path. It tries to get from one side of the tower to the other ^)^. If it can't make it to the other side, the path is blocked ;p.

2 sides chosen are based on a set of if statements to check what path through the tower was possibly blocked (left -> right, bottom -> top, right -> top, etc).
Nestharus is offline   Reply With Quote
Old 02-13-2012, 08:04 AM   #48 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Fixed a bug with towers that are built 1 space apart from each other and a third tower built to possibly block the space in between. It would always read it as a block : ). Now it works properly.


Thanks to magtheridon96 for his wmw noobiness as that allowed him to find the bug ; ).
Nestharus is offline   Reply With Quote
Old 02-13-2012, 08:30 AM   #49 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,754
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Quote:
Thanks to magtheridon96 for his wmw noobiness as that allowed him to find the bug ; ).
I'm improving D:
And my score is pretty good compared to what you've seen other "pros" do D:
__________________
Magtheridon96 is offline   Reply With Quote
Old 02-13-2012, 06:33 PM   #50 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Fixed bug with retrieving radius (was adding 16) and removed a debug message. Would have been updated last night, but my connection was down.
Nestharus is offline   Reply With Quote
Old 02-14-2012, 09:34 PM   #51 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
This still has a bit of the bug mag found in it :\. I'm seeing noobs playing my wmw map encounter it over and over again. I'll investigate it tomorrow as I don't have time today.
Nestharus is offline   Reply With Quote
Old 02-16-2012, 02:38 AM   #52 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Fixed final band-aid bug
Fixed 32x32 towers
Made all collision sizes work (no longer hard coded)
Fixed larger towers by making start and end points calculated while determining what is blocked around the tower


So... I believe that this now has 0 bugs and it's uber fast. I could run it off of a minimum binary heap to minimize the loop sizes when the path isn't blocked, but that'd significantly increase overhead when the path is blocked (bad worst case scenario). I'm trying to keep the worst case scenario as good as possible as I think a freeze is much worse than a generally slower operation ;D.


Anyways Bribe, you can go ahead and approve this for use in Tower War and Tower Defense maps now : D.
Nestharus is offline   Reply With Quote
Old 02-16-2012, 03:06 AM   #53 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,754
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Note: A resource can only be approved if it's requirements are approved ;)
__________________
Magtheridon96 is offline   Reply With Quote
Old 02-16-2012, 05:36 AM   #54 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1210)Bribe has much of which to be proud (1210)
PayPal Donor: This user has donated to The Hive. 
Approved. Fun resource.

Edit: The RegisterPlayerUnitEvent in your map that "AnitBlock" uses is the suck, what's the point in adding verbosity by requiring boolexpr instead of code? That's a sucky change.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 02-16-2012, 07:07 AM   #55 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Uh, I follow JASS standards. If you look at the actual resource, it does not have the Condition stuff in there ; ).
Nestharus is offline   Reply With Quote
Old 02-16-2012, 07:50 AM   #56 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1210)Bribe has much of which to be proud (1210)
PayPal Donor: This user has donated to The Hive. 
If you really followed JASS standards your programming structure would be way more readable.

Earlier this morning your code looked different, you just changed it ;)

You originally wrote
Jass:
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_CONSTRUCT_START, @Condition(@function thistype.checkBlock@)@)
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 02-16-2012, 08:18 AM   #57 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Uh huh, because I had forgotten to change it back. It's Condition( ) in my maps ; ).
Nestharus is offline   Reply With Quote
Old 02-16-2012, 08:43 AM   #58 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1210)Bribe has much of which to be proud (1210)
PayPal Donor: This user has donated to The Hive. 
And in my WarChasers 2 map it only registers for players 0, 1, 5 and 6 (provided they are also playing).

To each his/her own ;)
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 02-16-2012, 02:58 PM   #59 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,754
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
And in my map, I use a dynamic version of RegisterPlayerUnitEvent that allows me to use multiple triggers so I can enable and disable certain boolexprs :P
__________________
Magtheridon96 is offline   Reply With Quote
Old 02-21-2012, 01:10 AM   #60 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,986
Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)Nestharus has much of which to be proud (959)
Fixed final bugs... I think IsPathable was bugging it up, so get the updated IsPathable objects.

This also uses better stuff now for generating the pathing map, so it's a little bit faster on load time ^)^.


Also, it is 100% official.. if players are allowed to build on all corners in a playable map area, they will be able to blanket the entire area. As long as you make it so one corner is unbuildable, you will be ok ^)^.


This is due to how the preprocessing stuff works. Sadly, there is no way to resolve this issue, it's 100% impossible. Resolving this issue would make it impossible to build bricks of towers, which don't technically block >.>. The preprocessing was done purposefully to allow for bricks (in wmw, air guards are always bricks of towers). So just make one corner in each playable area unbuildable and you'll be golden.
Nestharus is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 03:45 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle