I Want To Learn

tooltiperror

Super Moderator
Reaction score
231
Also, try methods.

JASS:

struct Person

    method WhateverYouWant takes nothing returns nothing
        //Whatever you want to be executed
    endmethod

endstruct

function onInit ...
    local Person fooperson = Person.create()
    call fooperson.WhateverYouWant()
endfunction
 

DioD

New Member
Reaction score
57
strongly recommend you to view compiled code of vJass (zinc cjass and any other extension).

most workarounds are very wierd and ineffective in some (most) cases due universal design.

method is actually function with additional integer param linked to struct instance

JASS:
    call fooperson.WhateverYouWant()


==

JASS:
    call WhateverYouWant(fooperson)


any struct handle is simple integer
JASS:
if fooperson == 6 then

will compile and work well.

extendion hide this from you, limit your ability to code.
 

tooltiperror

Super Moderator
Reaction score
231
sure.

JASS:

struct Data

    method Example takes nothing returns nothing
        call BJDebugMsg("Hello, World!")
    endmethod

endstruct

function foo ...
    local Data data=Data.create()
    call data.Example()
endfunction
 

hellmonja27

Member
Reaction score
16
sure.

JASS:

struct Data

    method Example takes nothing returns nothing
        call BJDebugMsg("Hello, World!")
    endmethod

endstruct

function foo ...
    local Data data=Data.create()
    call data.Example()
endfunction

sweet! ok, i've read some of the tutorials for JASS. i understand that using coordinates is better than using locations. but i've yet to see a sample code that used coordinates for sliding effects. how do you calculate the polar offset using coordinates? or is that the time when i use locations?...
 

Bribe

vJass errors are legion
Reaction score
67
converts your locations into coordinates in order to do the math for offsetting your location. Click that link to read about how it does that ;)
 

Laiev

Hey Listen!!
Reaction score
188

Bribe

vJass errors are legion
Reaction score
67
I actually prefer not to waste server bandwidth on a web site by posting that huge chunk of HTML without a reasonable alternative ;)
 

hellmonja27

Member
Reaction score
16
we lost inet connection. i'm in a public inet shop. still trying to learn vJASS, balancing it with work and all. be back once we have connection.

i do have a question on timers though. so far all i see are timers being terminated by a PolledWait command. i was wondering if you could terminate it using conditions...
 

Sevion

The DIY Ninja
Reaction score
413
Where do you see timers being terminated by a PolledWait command?

What does that even mean?
 

hellmonja27

Member
Reaction score
16
ok sorry i was wrong. TriggerSleepAction yes, that's the command i meant.

ok so say you have a timer that slides a unit in a straight line and the timer only terminates when it comes near an area. or if a timer adds up something and it terminates once it reaches a certain value. how do you terminate such timers?...
 

Bribe

vJass errors are legion
Reaction score
67
Use Timer32, it's found in Jesus4Lyf's signature. Call .stopPeriodic() when certain conditions are met and that will terminate the timer callbacks.
 

baassee

Member
Reaction score
5
Or use TimerUtils and release the timer although Timer32 is better but a bit higher coding phase. But once you've learned it, it's simple.
 

Rocket|...

New Member
Reaction score
0
I don't know if I should ask this here: I want to learn, too. and
- The NewGen doesn't work with worldedit.exe 1.24, does it?
- Will there be any problem if I just use NewGen with WE 1.21b? Will I be able to code using vJass? will my created map be playable on 1.24e? and what about the map size limit?
Thank for reading.
 

Laiev

Hey Listen!!
Reaction score
188
You should create another thread instead of heck someone

> The NewGen doesn't work with worldedit.exe 1.24, does it?
It Work.

> Will there be any problem if I just use NewGen with WE 1.21b?
Yes, hashtable function don't work right while editing (only in GUI).

> Will I be able to code using vJass?
Yes, NewGen is the only editor that support edit vJass and all other things in Warcraft III Map.

> will my created map be playable on 1.24e?
Yes.

> and what about the map size limit?
8Mb.
 

Rocket|...

New Member
Reaction score
0
would you please btw show me how to use NewGen with WE 1.24, as It always make a "worldedit121.exe" whenever I run it T_T
@hellmonja27: sorry for the inconvenience. Hope you didn't mind. It makes me feel bad creating a whole new thread just to ask a few questions. Once again, I'm sorry, I created a new topic T_T
 

hellmonja27

Member
Reaction score
16
@Rocket| nah, s'okay. no harm done there.

hmm, seems i still got a lot to learn. ok, i found JesusLyf and his Timer32 tutorial. this is gonna take some time understanding i guess. thanks for the directions people...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top