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 > Resources > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-13-2009, 06:01 PM   #241
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by xombie
At any point if that unit that was created triggers the "enter region" trigger that was declared, then it will register a second damage event for the same unit.
But that will never happen unless your unit leaves the map area and then re-enters it. Can that actually happen? My games crash when I do that.
__________________
Rising_Dusk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-13-2009, 06:07 PM   #242
xombie
Banned
 
Join Date: Oct 2006
Posts: 858

xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)

Default

Well they don't necessarily have to leave, they only have to trigger the entering event. I'm not super sure, but what happens when a hero dies (and is dead for say, 30 seconds) and then gets revived?
xombie is offline   Reply With Quote
Old 03-13-2009, 06:13 PM   #243
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Hrm... I don't know. That is a valid point, though, if it is indeed the case. Can you confirm or refute that? I won't have access to WC3 for awhile.
__________________
Rising_Dusk is offline   Reply With Quote
Old 03-13-2009, 06:32 PM   #244
Blacktastic
User
 
Blacktastic's Avatar
 
Join Date: Oct 2006
Posts: 138

Blacktastic is on a distinguished road (12)

Default

Just tested it with real basic code and it appears the a dead hero never leaves the point he died in, whether it be a player generated region or current map bounds.

Trigger:
Melee Initialization
Collapse Events
Player - Player 1 (Red) types a chat message containing die as An exact match
Conditions
Collapse Actions
Unit - Kill Mountain King 0000 <gen>

Trigger:
Melee Initialization Copy
Collapse Events
Player - Player 1 (Red) types a chat message containing live as An exact match
Conditions
Collapse Actions
Hero - Instantly revive Mountain King 0000 <gen> at (Center of Region 000 <gen>), Hide revival graphics

Trigger:
Untitled Trigger 001
Collapse Events
Unit - A unit enters Region 000 <gen>
Conditions
Collapse Actions
Custom script: call BJDebugMsg("oh man")

Last edited by Blacktastic : 03-13-2009 at 06:34 PM.
Blacktastic is offline   Reply With Quote
Old 03-13-2009, 07:59 PM   #245
xombie
Banned
 
Join Date: Oct 2006
Posts: 858

xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)

Default

I'll test to see if ShowUnit makes anything weird, either.

Nope. Looks like you're clear. Its safe to say then that EnterRegion(someTrigger, GetWorldBounds()) is a detector of units being created, period.

Last edited by xombie : 03-13-2009 at 08:04 PM.
xombie is offline   Reply With Quote
Old 03-13-2009, 08:24 PM   #246
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

i thought you said you had issues previously? are they no longer relevant?
__________________
emjlr3 is offline   Reply With Quote
Old 03-13-2009, 08:48 PM   #247
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

Quote:
Originally Posted by Rising_Dusk
I cannot reproduce that in my own testmap. Can you please provide the exact circumstances where the triggers are firing twice for a single unit?
I have a triggered crit with a priority of 5 and a damage storing ability like your ninja guy on aotz with a priority of 1. There are times when the crit triggers with the extra stored damage. If you need the codes, let me know.
Joker is offline   Reply With Quote
Old 03-13-2009, 09:10 PM   #248
Blacktastic
User
 
Blacktastic's Avatar
 
Join Date: Oct 2006
Posts: 138

Blacktastic is on a distinguished road (12)

Default

I don't use the priority (I honestly don't see a need for it even) and I havn't noticed any issues with it yet.
Blacktastic is offline   Reply With Quote
Old 03-13-2009, 11:36 PM   #249
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by emjlr3
i thought you said you had issues previously? are they no longer relevant?
It was Joker.
Quote:
Originally Posted by Joker
I have a triggered crit with a priority of 5 and a damage storing ability like your ninja guy on aotz with a priority of 1. There are times when the crit triggers with the extra stored damage. If you need the codes, let me know.
This doesn't sound incorrect, actually. The system can have multiple triggers associated to it, that it runs the 5 priority critical, the DAMAGE_TYPE_ATTACK triggering, and the priority 1 catcher seems to be the correct behavior. You'll need to elaborate more if you think it is.
__________________
Rising_Dusk is offline   Reply With Quote
Old 03-14-2009, 01:27 AM   #250
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Quote:
Originally Posted by Rising_Dusk
But that will never happen unless your unit leaves the map area and then re-enters it. Can that actually happen? My games crash when I do that.
I just tested it with Bound Sentinel and it will cause the unit to be registered multiple times.
Fledermaus is offline   Reply With Quote
Old 03-24-2009, 11:51 PM   #251
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Well that sucks. I'll address it in an update, then.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-27-2009, 03:25 AM   #252
Sinnergy
User
 
Sinnergy's Avatar
 
Join Date: Apr 2009
Posts: 173

Sinnergy has little to show at this moment (8)

Default

playing with priorities and created this simple miss trigger that misses every attack, healing the damaged unit because we cant ignore the normal attack damage using IgnoreHigherPriority() function, the evasion trigger has priority of 1, and the critical strike inside the demo map, has a trigger priority of 2 (because i changed it), this makes all damage via attack be healed when a unit is damaged by an attack

Collapse JASS:
scope Evasion initializer init

private function con takes nothing returns boolean
    return GetTriggerDamageType() == DAMAGE_TYPE_ATTACK
endfunction

private function act takes nothing returns nothing
    local unit cast = GetTriggerDamageTarget()
    local unit targ = GetTriggerDamageSource()
    local real dmg = GetTriggerDamage()
    call SetWidgetLife(cast, GetWidgetLife(cast)+dmg)
    call BJDebugMsg("miss")
    call IgnoreHigherPriority()
endfunction

private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerAddCondition(t, Condition(function con))
    call TriggerAddAction(t, function act)
    call TriggerRegisterDamageEvent(t,1)
endfunction

endscope

2 problems i encountered

1. when a unit attacks a target he never attacked before, it still damages the target, then after the first attack, the evasion trigger now works for that unit on that target, it also doesn't work for other units that hasn't been attacked before

2. when a ranged unit attacks a target, it still damages the target for a small amount, tested like making the blood mage attack the blade master, dealing 1-3 damage on the blade master every time the blood mage attacks, while damaging the blood mage for the first attack of the blade master

how to fix this?
__________________
Current Project:
Rise of Sinnergy v1.00

Last edited by Sinnergy : 04-27-2009 at 03:26 AM.
Sinnergy is offline   Reply With Quote
Old 04-27-2009, 03:29 AM   #253
Bobo_The_Kodo
oO
 
Bobo_The_Kodo's Avatar
 
Join Date: Jul 2008
Posts: 580

Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)

Default

Quote:
how to fix this?

All events occur right before what is happening actually happens

therefore you are healing them before they take damage
Bobo_The_Kodo is offline   Reply With Quote
Old 04-27-2009, 12:37 PM   #254
dead_or_alivex
User
 
Join Date: Jun 2008
Posts: 72

dead_or_alivex has little to show at this moment (3)

Default

In other words, you should use a 0-second timer to delay the heal. Preferably you could heal both before and after, checking in between if the correct amount was healed (and not starting that timer if it was).
dead_or_alivex is offline   Reply With Quote
Old 05-07-2009, 01:24 PM   #255
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

I have felt that the damage done through this seems a bit wonky at times

for instance - I want to damage my hero by a percent of his current hp, and make it magic damage(wc3 damage)

Collapse JASS:
call UnitDamageTargetEx(u, u, GetWidgetLife(u)*.4, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_SPELL, true)

kills my hero instantly - what am I not getting? - and yes, GetWidgetLife(u)*.6>.405

I figure ATTACK_TYPE_MAGIC makes wc3 treat it as magic damage, which should be reduced by 25% for heroes - the armor boolean should not matter in this case, so I just leave it as true

anyone care to elaborate on attack_types a bit, and how they relate to the armor boolean

thanks
__________________

Last edited by emjlr3 : 05-07-2009 at 04:23 PM.
emjlr3 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 03:25 PM.


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