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 10-13-2008, 09:20 AM   #136
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

now it stuns fogged units, but still the 2-units-picked-instead-of-one-when-terminating-the-code bug is not fixed

EDIT: got another question (maybe a suggestion?), how to destroy xecollider when it travels a given distance?

i can do this by getting the distance between the xecollider and the origin, terminate if the distance conditions are met, but there are some glitches when i do this, lets say a caster is too near from the boundaries, and when the caster releases the xecollider towards the boundary, the xecollider dummy will slowly run to the side, lets say the dummy will be terminated if the distance between the dummy and origin is equal or greater than 2000, now the dummy already travels 5000 range (if its traveling into the sides), but still wont be destroyed

is there an easier way to set the max distance traveled by the dummy until destroyed?
__________________

Last edited by waaaks : 10-13-2008 at 12:13 PM.
waaaks is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-13-2008, 12:48 PM   #137
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
now it stuns fogged units, but still the 2-units-picked-instead-of-one-when-terminating-the-code bug is not fixed
I just posted a xecast update so that was unlikely.

I fixed that one.

Collapse JASS:
    set xc.duration = WANTED_DISTANCE / xc.speed //?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-13-2008, 11:54 PM   #138
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

but its not about xecast, its about xecollider stuffs
__________________
waaaks is offline   Reply With Quote
Old 10-14-2008, 02:18 AM   #139
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by waaaks
but its not about xecast, its about xecollider stuffs
my point exactly, a post containing a xecast update wouldn't fix a xecollider bug, I fixed that issue of picking after terminate, I just need zen87 to post his bug report map's inputwar3map.j so I can investigate the bigger xecollider bug, then I'll be able to release xe0.5 , if you have time to get that inputwar3map.j , that would help.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-14-2008, 06:47 AM   #140
zen87
vJass maniac
 
zen87's Avatar
 
Join Date: May 2006
Posts: 732

Submissions (1)

zen87 has a spectacular aura about (86)zen87 has a spectacular aura about (86)zen87 has a spectacular aura about (86)

Send a message via MSN to zen87
Default

yay, the recycle delay have no problem for now, hope that the collision missle will be fixing soon too :)
__________________
Final Alliance
An RPG like no other
zen87 is offline   Reply With Quote
Old 10-14-2008, 09:28 AM   #141
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

"inputwar3map.j"?? whats that for? and where can i find it?
__________________
waaaks is offline   Reply With Quote
Old 10-14-2008, 12:49 PM   #142
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

newgenpack has a logs folder.

When you save a map, an inputwar3map.j file will appear in that folder. I need that map's input script.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-14-2008, 10:31 PM   #143
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

heres my inputwar3map.j
Attached Files
File Type: rar inputwar3map.rar (36.8 KB, 10 views)
__________________
waaaks is offline   Reply With Quote
Old 10-15-2008, 01:06 AM   #144
WNxCryptic
User
 
WNxCryptic's Avatar
 
Join Date: Dec 2006
Posts: 257

WNxCryptic is on a distinguished road (24)

Default

On the stormydreams example, what does the MODEL_PATH_MISSILE serve? I used it several times, but with so much happening I couldn't pick that particular model up anywhere.

Also, what is the difference between CAST_REQUIRED_LEVEL and CAST_REQUIRED_BONUSLEVEL? The comments there didn't make a great deal of sense...
__________________

Last edited by WNxCryptic : 10-15-2008 at 01:32 AM.
WNxCryptic is offline   Reply With Quote
Old 10-15-2008, 01:33 AM   #145
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by WNxCryptic
On the stormydreams example, what does the MODEL_PATH_MISSILE serve? I used it several times, but with so much happening I couldn't pick that particular model up anywhere.

Also, what is the difference between CAST_REQUIRED_LEVEL and CAST_REQUIRED_BONUSLEVEL? The comments there didn't make a great deal of sense...
As I noticed I accidentally gave the name BONUS to the normal missile and viceversa:

Collapse JASS:

       if(th.bonuslevel>0) then
           set m.fx.fxpath=MODEL_PATH_MISSILE
       else
           set m.fx.fxpath=MODEL_PATH_BONUS_MISSILE
       endif
So, if you want to know where MODEL_PATH_MISSILE is used, grab the claws of fire item and cast stormy dreams.


zen87: Ouch I know what the problem is, right now to detect the collision event I pick units that are in range of the current position but weren't in range of the previous position, there is a problem and it is that a unit could move to a position that was in range of both centers without being detected by the other one, this is more noticeable with homing.

Right now, I got to give a lot of brains to thinking of a good way to do the collision event in a way that works like blizz' unit in range event without having this bug, however, you can fix it temporarily.

Collapse temfix:
library SoulStrike initializer init requires xecollider, xedamage
    
globals
    private constant integer SPELL_ID  ='A00A' //The triggerer spell id.
    
    private xedamage damageOptions
endglobals
       
private struct Soul extends xecollider
    unit caster
    integer level
    integer n
    real zs
    
    method onUnitHit takes unit hitunit returns nothing
        if damageOptions.allowedTarget(this.caster,hitunit) then
            if GetWidgetLife(hitunit)>0.405 then
                call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",hitunit,"origin")) 
                call damageOptions.damageTarget(this.caster,hitunit,this.level*50.0)
            endif
        endif
        if hitunit==this.targetUnit then
            call this.terminate()
        endif
    endmethod

    method onDestroy takes nothing returns nothing
        set this.caster = null
    endmethod

    method loopControl takes nothing returns nothing
     local real dx
     local real dy

        if (IsUnitInRangeXY( this.targetUnit , this.x , this.y , this.collisionSize ) ) then
            call this.onUnitHit(this.targetUnit)
            return
        endif

        if this.n>0 then
            set this.n=this.n-1
            set this.z=this.z+5.25
            if this.n==0 then
                set dx = this.x-GetUnitX(this.targetUnit)
                set dy = this.y-GetUnitY(this.targetUnit)
                set this.zs=3200./SquareRoot(dx*dx+dy*dy)
                set this.fxpath = "Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl"
            endif
        else
            set this.z=this.z-this.zs
        endif
    endmethod
endstruct

private function onSpellEffect takes nothing returns nothing
 local unit u = GetTriggerUnit()
 local unit c = GetSpellTargetUnit()
 local real x
 local real y
 local real a
 local boolean da=true
 local Soul s
 local integer  i=0
    call TriggerSleepAction(0.0)
    call SetUnitAnimation(u,"attack")
    loop
        set i=i+1
        exitwhen i>10
        set x = GetUnitX(u)
        set y = GetUnitY(u)
        if da then
            set a = Atan2(GetUnitY(c)-y,GetUnitX(c)-x)+GetRandomReal(.0001,bj_PI*.5)
            set da=false
        else
            set a = Atan2(GetUnitY(c)-y,GetUnitX(c)-x)-GetRandomReal(.0001,bj_PI*.5)
            set da=true
        endif
        set s = Soul.create(x,y,a)
        set s.fxpath       = "Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"
        set s.minSpeed     = -600.0 // cap the speed
        set s.maxSpeed     = 2000.0 // cap the speed
        set s.speed        = GetRandomReal(-550,-400)  // Initial speed
        set s.acceleration = 350.0  // accelerate at a ratio per second
        set s.n            = 60 //counter
        
        set s.z = 20.0
        set s.angleSpeed = 3.25
        set s.angleSpeed = 65.6789
        set s.targetUnit = c
        set s.caster = u
        set s.level  = GetUnitAbilityLevel(u,SPELL_ID)
        call TriggerSleepAction(0.0)
    endloop
    
 set u=null
 set c=null
endfunction

private function spellIdMatch takes nothing returns boolean
    return GetSpellAbilityId()==SPELL_ID
endfunction

private function init takes nothing returns nothing
 local trigger t=CreateTrigger()
    set damageOptions=xedamage.create()
    set damageOptions.dtype = DAMAGE_TYPE_MAGIC
    set damageOptions.atype = ATTACK_TYPE_NORMAL
        
    set damageOptions.damageEnemies = true
    set damageOptions.damageAllies  = false
    set damageOptions.damageNeutral = true
    set damageOptions.damageSelf    = false
    call damageOptions.factor(UNIT_TYPE_STRUCTURE,0.5)

    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t,Condition(function spellIdMatch))
    call TriggerAddAction(t,function onSpellEffect)
 set t=null
endfunction

endlibrary
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-15-2008, 04:22 PM   #146
zen87
vJass maniac
 
zen87's Avatar
 
Join Date: May 2006
Posts: 732

Submissions (1)

zen87 has a spectacular aura about (86)zen87 has a spectacular aura about (86)zen87 has a spectacular aura about (86)

Send a message via MSN to zen87
Default

thanks vex! working fine now, hope that you will release 0.5 soon with the trouble solved!

p/s: really learned hell lots in xe x) *2 thumbs up*
__________________
Final Alliance
An RPG like no other
zen87 is offline   Reply With Quote
Old 10-16-2008, 03:35 PM   #147
WNxCryptic
User
 
WNxCryptic's Avatar
 
Join Date: Dec 2006
Posts: 257

WNxCryptic is on a distinguished road (24)

Default

Vex, on your FireNovaStrike example, in the onDestroy method of your fireball struct you set the casting hero = null and then (in a comment) say its not a good idea.

Why isn't it a good idea? And if you don't do it there, where else COULD you do it that would be better?
__________________
WNxCryptic is offline   Reply With Quote
Old 10-16-2008, 04:01 PM   #148
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

It isn't a good idea to make a whole onDestroy to just null a member variable, because it is not necessary to null those things. (They are actually globals, not locals) but as a sample it is ok, it will not initiate a catastrophe, it is just unnecessary code.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-16-2008, 07:11 PM   #149
WNxCryptic
User
 
WNxCryptic's Avatar
 
Join Date: Dec 2006
Posts: 257

WNxCryptic is on a distinguished road (24)

Default

3d Home?

With the firenovastrike example (and presumably with how xecollider is designed right now) all you have is 2d homing...how much more complicated would it be to add a 3d homing option to xecollider where you can set a missile's height to be floating mid air and then have it arc back down towards the target?
__________________
WNxCryptic is offline   Reply With Quote
Old 10-16-2008, 10:29 PM   #150
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

Quote:
Originally Posted by WNxCryptic
Vex, on your FireNovaStrike example, in the onDestroy method of your fireball struct you set the casting hero = null and then (in a comment) say its not a good idea.

Why isn't it a good idea? And if you don't do it there, where else COULD you do it that would be better?
its really not a good idea, he just did that to show people that we can add more stuffs in ondestroy
__________________
waaaks 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 10:22 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