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 > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-01-2008, 01:41 PM   #1
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 Handle Systems

Is there really that much difference between handle system? Should I not be using just the regular old Local Handle Variables System?. If not, which would you recomend?
Fledermaus is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-01-2008, 01:53 PM   #2
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Handle Systems Suck Balls.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 02-01-2008, 01:57 PM   #3
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

What should I be using instead then?
Fledermaus is offline   Reply With Quote
Old 02-01-2008, 02:12 PM   #4
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

cohadar will always say most of the system out there suck balls when it is not ABC

btw, try vex's caster system and CSCache, one of the things I'll never miss in my map
__________________
Final Alliance
An RPG like no other

Last edited by zen87 : 02-01-2008 at 02:14 PM.
zen87 is offline   Reply With Quote
Old 02-01-2008, 03:57 PM   #5
chobibo
100% Genuine Retard!
 
chobibo's Avatar
 
Join Date: Jan 2007
Posts: 797

chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)

Send a message via Yahoo to chobibo
Default

@zen87: Right on man! lol, but this time cohadar is right, some of LHVS functions sucks.
@Antiquities: you can use Local Handle Vars, use only functions that store integers, but use it with arrays, store only array indexes, that would be better
__________________
Where's mah sig?

Last edited by chobibo : 02-01-2008 at 03:57 PM.
chobibo is offline   Reply With Quote
Old 02-01-2008, 04:56 PM   #6
Blue_Jeans
User
 
Join Date: Jan 2008
Posts: 22

Blue_Jeans has little to show at this moment (3)

Default

Well, I recently learned Handle Vars, then I heard about structs. I'm telling you, man, a system using structs such as Cohadar's ABC are the way to go. However, depending on what it is you are doing you may need more than one system. Cohadar's ABC is designed to attach things ONLY to timers. If you need to attach other things, you will need to look at other systems. Normally you are attaching things to timers anyways, so this is not a problem.
__________________

Last edited by Blue_Jeans : 02-01-2008 at 05:26 PM.
Blue_Jeans is offline   Reply With Quote
Old 02-01-2008, 05:39 PM   #7
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by Blue_Jeans
Well, I recently learned Handle Vars, then I heard about structs. I'm telling you, man, a system using structs such as Cohadar's ABC are the way to go. However, depending on what it is you are doing you may need more than one system. Cohadar's ABC is designed to attach things ONLY to timers. If you need to attach other things, you will need to look at other systems. Normally you are attaching things to timers anyways, so this is not a problem.
That's the problem, you get limited with the excuse that you only need to attach to timers, that's the reason why I do not use ABC. If you have one system to store on timers, other on triggers, other on units, then you are not being efficient.

If you want something safe and versatile, use CSCache and attach to the required object the struct index.

Collapse Teh example:
//This example uses CSSafety to manage timers and Kattana's handle Vars to pass data to other functions
struct Data
    unit u
    real v1
    real v2
    
    static method create takes unit u, real v1, real v2 returns Data // method used to create and add the data in one line of code
        local Data D = Data.allocate()
        set D.u = u
        set D.v1 = v1
        set D.v2 = v2
        return D
    endmethod
endstruct

function Loop takes unit u returns nothing
    local timer t = GetExpiredTimer()
    local Data D = Data( GetHandleInt(t, "Data") ) //retrieves the data from the timer
    // do your stuff...
endfunction

function Actions takes nothing returns nothing
    local Data D = Data.create(GetSpellTargetUnit(), 100., 45.)
    local timer t = NewTimer()
    call SetHandleInt(t, "Data", integer(D)) // here, you attach the struct to the timer by setting the Data index...
    call TimerStart(t, 0.1, true, function Loop)
    set t = null
endfunction

Last edited by moyack : 02-01-2008 at 05:45 PM.
moyack is offline   Reply With Quote
Old 02-01-2008, 06:59 PM   #8
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

First of all ABC can attach to timers, triggers and dialogs.
And for some timers it is better to use TT than any other systems.

As for units PUI cannot be matched.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 02-01-2008, 08:05 PM   #9
Blue_Jeans
User
 
Join Date: Jan 2008
Posts: 22

Blue_Jeans has little to show at this moment (3)

Default

Quote:
Originally Posted by cohadar
First of all ABC can attach to timers, triggers and dialogs.
And for some timers it is better to use TT than any other systems.

This is true, however, you've said it yourself that you should only attach things to timers starting on v4.6. In v5.0 you made functions for triggers and dialogs, but you never said you should use them, or at least didn't edit your previous statement to say you should.

Off-topic: Cohadar, I have some code I'd really like you to tear to pieces and tell me what I'm doing wrong. It works as far as I can tell, but I'm not sure I'm doing thing properly. I've only recently learned structs, so I am sure I have made mistakes. I need someone who can set me straight without all the fluff or fear of offending me. From reading various threads here, you are quite the orc or troll PM me if you will do it and I'll send you the code.
__________________
Blue_Jeans is offline   Reply With Quote
Old 02-01-2008, 08:29 PM   #10
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,523

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Sometimes KaTTaNa's Local Handle Variables leaks gamecaches.
The main function in some versions looks like this:
Collapse JASS:
function LocalVars takes nothing returns gamecache
    return InitGameCache("JASSLocalVars.w3v")
endfunction


Quote:
Originally Posted by Blue Jeans
Off-topic: Cohadar, I have some code I'd really like you to tear to pieces and tell me what I'm doing wrong. It works as far as I can tell, but I'm not sure I'm doing thing properly. I've only recently learned structs, so I am sure I have made mistakes. I need someone who can set me straight without all the fluff or fear of offending me. From reading various threads here, you are quite the orc or troll PM me if you will do it and I'll send you the code.
Just post a thread about it... he's not the only one who will help you, and this is a forum for a reason.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 02-01-2008 at 08:30 PM.
Pyrogasm is offline   Reply With Quote
Old 02-02-2008, 11:02 AM   #11
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Quote:
Originally Posted by Blue_Jeans
Off-topic: Cohadar, I have some code I'd really like you to tear to pieces and tell me what I'm doing wrong. It works as far as I can tell, but I'm not sure I'm doing thing properly. I've only recently learned structs, so I am sure I have made mistakes. I need someone who can set me straight without all the fluff or fear of offending me.

Sorry I don't give free advice.
I like to charge my knowledge in bashing, so if you have any questions ask them in jass thread and you will receive a decent mix of bash and good advice.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar 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 07:53 AM.


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