[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 > Resources > Graveyard


Graveyard Resources which were not approved are moved to this section.

 
 
Thread Tools
Old 03-31-2012, 12:15 PM   #106 (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)
yay i found a test map!

gonna test it soon... then by the time I understand it.. I'll use TT for the sake of alienation

*kiddin

btw.. is CTL(the deprecated one) and CTM have the same implementation?
__________________

Map's Forum
jim7777 is offline  
Old 03-31-2012, 07:28 PM   #107 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,842
Nestharus has disabled reputation
CTM doesn't require a timeout constant. If you are just using .031250000, use the third module in this.
Nestharus is offline  
Old 04-02-2012, 08:13 AM   #108 (permalink)
Registered User iAyanami
Spectral
 
iAyanami's Avatar
 
Join Date: Dec 2010
Posts: 146
iAyanami is on a distinguished road (79)iAyanami is on a distinguished road (79)
Just kinda confused here. Both CTT and CTTC are for constant timeouts. On what circumstances would I choose CTT over CTTC or the latter?
iAyanami is offline  
Old 04-02-2012, 04:55 PM   #109 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,842
Nestharus has disabled reputation
CTTC is a constant timeout that will always merge, meaning one timer node for all timers. CTC is a constant timeout that won't always merge.

CTC might use a timeout of 2 or 5
CTTC might use a timeout of .03125 or .1
Nestharus is offline  
Old 04-22-2012, 09:09 AM   #110 (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)
I'm currently making some sort of spell apparently.. i can't seem to let it work with either CTM or CTTC.. and CTTC is worst 'cause the first cast will stop (if there are no enumerated units) and gives me a fatal error on second simultaneous cast (if there are any enumerated units)

here's the code lol
Jass:
scope MetalShot
   
    private struct MetalShot
        unit caster
        unit array arrows[3]
        player owner
        integer lvl
        real array cos[3]
        real array sin[3]
        real dmg
        real dist
        private static constant real TIMEOUT = 0.031250000
        private static hashtable ht = InitHashtable()
        private group tmpGroup = bj_lastCreatedGroup
       
        implement CTT
            local unit f
            local integer i
            local real x
            local real y
        implement CTTExpire
            if dist > 0 then
                set i = 0
                loop
                    exitwhen i >= 3
                    set x = GetUnitX(this.arrows[i]) + 21 * this.cos[i]
                    set y = GetUnitY(this.arrows[i]) + 21 * this.sin[i]
                    call SetUnitX(this.arrows[i],x)
                    call SetUnitY(this.arrows[i],y)
                   
                    call GroupEnumUnitsInRange(tmpGroup,x,y,250,null)
                    loop
                        set f = FirstOfGroup(tmpGroup)
                        exitwhen f == null
                        call GroupRemoveUnit(tmpGroup,f)
                        if IsUnitEnemy(f,this.owner) and not IsUnitType(f,UNIT_TYPE_STRUCTURE) and UnitAlive(f) and not HaveSavedBoolean(ht,this,GetHandleId(f)) then
                            call UnitDamageTarget(this.caster,f,this.dmg,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,null)
                            call SaveBoolean(ht,this,GetHandleId(f),true)
                        endif
                    endloop
                    set i = i + 1
                endloop
                set dist = dist - 21
            else
                set i = 0
                loop
                    exitwhen i >= 3
                    call RemoveUnit(this.arrows[i])
                    set i = i + 1
                endloop
                call FlushChildHashtable(ht,this)
                call this.destroy()
            endif
        implement CTTNull
            set f = null
        implement CTTEnd
       
        static method start takes nothing returns boolean
            local thistype this = thistype.create()
            local integer i = 0
            local real angle
            set this.caster = GetTriggerUnit()
            set this.owner = GetTriggerPlayer()
            set this.lvl = GetUnitAbilityLevel(this.caster,'A009')
            set this.dist = 700
            set this.dmg = 1000
            set angle = GetUnitFacing(this.caster)-45
            loop
                exitwhen i >= 3
                set this.arrows[i] = CreateUnit(Player(15),'h006',GetUnitX(this.caster),GetUnitY(this.caster),angle)
                set this.cos[i] = Cos(angle*bj_DEGTORAD)
                set this.sin[i] = Sin(angle*bj_DEGTORAD)
                set angle = angle + 45
                set i = i + 1
            endloop
            return false
        endmethod
       
        static method onInit takes nothing returns nothing
            call RegisterSpellEffectEvent('A009',function thistype.start)
        endmethod
    endstruct
endscope
To reproduce it, you must cast the spell simultaneously... or while the first cast is still in effect

pretty bad lol
__________________

Map's Forum
jim7777 is offline  
Old 04-22-2012, 09:17 AM   #111 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,842
Nestharus has disabled reputation
And this be why
private struct MetalShot

it has to extend array


whenever you use one of my modules, just assume that the struct has to extend array or it won't work =P.
Nestharus is offline  
Old 04-22-2012, 09:21 AM   #112 (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)
lol that stopped me from using arrays..
lemme test

EDIT:
Yey it's working magnificently!! But i still use arrays >:D
Also, please update the docs... it didn't say that it is required that I must extend array
only the examples said it... o.o

ohh well
Quote:
Nes Nes is awesome
By Nes Nes

Nes Nes is so awesome
That I wrote this awesome poem
How awesome
EDIT 2:
Perhaps you may update your Recycle library or this library.. struct Timer is being redeclared o.o
__________________

Map's Forum

Last edited by jim7777; 04-22-2012 at 10:05 AM.
jim7777 is offline  
Old 04-23-2012, 02:23 AM   #113 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,684
mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)
Quote:
CTC might use a timeout of 2 or 5
Nes, you should indicate in the documentation that a particular timer loop cannot run under 'X real', coz I've tested CTC and it cant run under 0.4, and CTTC cant run above 0.3...

Quote:
it has to extend array
Maybe it's an option, coz I've tested it and worked just fine :)...
__________________
Maps Systems AI Systems

I believe in miracles as I've seen them all come true
mckill2009 is offline  
Old 04-23-2012, 02:51 AM   #114 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,842
Nestharus has disabled reputation
mckill2009, they can run at whatever u want... they run based on the settings =P. You should read the documentation, because all of that was stated =).
Nestharus is offline  
Old 04-23-2012, 03:51 AM   #115 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,684
mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)
you mean they can run based on the module you implemented that is absolutely true, but running a CTT for example under 0.4 cant run...
__________________
Maps Systems AI Systems

I believe in miracles as I've seen them all come true
mckill2009 is offline  
Old 04-23-2012, 04:46 AM   #116 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,842
Nestharus has disabled reputation
yes it can... again, read the documentation and settings before you start stating that stuff

Jass:
************************************************************************************
*
*    SETTINGS
*/
Nestharus is offline  
Old 04-23-2012, 06:23 PM   #117 (permalink)
Registered User Zwiebelchen
Dance, my puppets, dance!
 
Join Date: Sep 2009
Posts: 3,116
Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)
Quote:
Originally Posted by Nestharus View Post
What does this tell you? Using standard timers is smart and better than using TimerUtils >.>, lolz.
Haha, thanks for pointing that out. :D
Now I don't feel bad anymore for not using any timer system at all in Gaias Retaliation, but manually handling all timer stuff.

Your system with the increase of speed when using one shot timers sounds neat.
However, there is something about it that will scare away most of the mappers in my oppinion:
It requires total recoding of almost everything as it uses a syntax that is totally different from using ordinary timers and other timer systems (with all the module stuff).
It's not done by replacing one or two lines with a text editor, so the amount of work people would have to invest into changing from like TimerUtils or T32 to this one on higher complexity maps is insane.
Not really your problem, though, just something I wanted to say. Maybe you can do something about it to make a switch between the systems easier? Maybe create a textmacro for compat for this?

Other than that: awesome stuff! I really love that module syntax. Too bad I am to lazy to switch to your system. ;(

... then again, I probably won't use enough timers anyway to get a noticable difference in fps.
Zwiebelchen is offline  
Old 04-23-2012, 06:56 PM   #118 (permalink)
Registered User Magtheridon96
~ Join The Daily Peon ~
 
Magtheridon96's Avatar
 
Join Date: Dec 2008
Posts: 6,298
Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)
Former Staff Member: This user used to be on the Hive Workshop staff. Merit Badge - Level 1: Great Assistant: Offers the best solution to other users, when all hope fades. Under the shell of assistance, lies a powerful knowledge in the fields. 
The noticeable difference starts at 60-ish timers with average specs :P
__________________
Are you good at 2D animation? You wanna make $ good money $?
PM me.
Magtheridon96 is offline  
Old 04-23-2012, 07:27 PM   #119 (permalink)
Registered User Zwiebelchen
Dance, my puppets, dance!
 
Join Date: Sep 2009
Posts: 3,116
Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)Zwiebelchen is a glorious beacon of light (571)
Quote:
Originally Posted by Magtheridon96 View Post
The noticeable difference starts at 60-ish timers with average specs :P
... assuming that there is nothing in the function attached to the timers. ;)

And 60 timers is a lot for me... I don't think I will ever reach that number. ^^
Zwiebelchen is offline  
Old 04-23-2012, 08:35 PM   #120 (permalink)
Registered User Magtheridon96
~ Join The Daily Peon ~
 
Magtheridon96's Avatar
 
Join Date: Dec 2008
Posts: 6,298
Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)Magtheridon96 has a reputation beyond repute (2193)
Former Staff Member: This user used to be on the Hive Workshop staff. Merit Badge - Level 1: Great Assistant: Offers the best solution to other users, when all hope fades. Under the shell of assistance, lies a powerful knowledge in the fields. 
Actually, I got that number from a few tests I did long ago with one of my spells =P

Of course, there was a noticeable difference with 10-20 casts, but the difference was completely noticeable when I did 60+ casts :D

Of course, that's a bit too far-fetched :p
What kind of game would allow you to make 60+ casts? xD
__________________
Are you good at 2D animation? You wanna make $ good money $?
PM me.
Magtheridon96 is offline  
 

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 10:59 PM.




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