1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll has begun! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.
deathdoorway
Last Activity:
Oct 28, 2018
Joined:
Apr 13, 2005
Messages:
621
Albums:
1
Birthday:
March 14
Home Page:
Location:
United states

deathdoorway

Novice Map Maker Growing, from United states

deathdoorway was last seen:
Oct 28, 2018
    1. Shendoo2
      Shendoo2
      No, im fine thanks though.
    2. Shendoo2
      Shendoo2
      how's your family situation going?
    3. Herman
      Herman
      To give you a quick general idea of how the trigger handle works, because now I'm out of time, you create the trigger handle, attach conditions, actions, and register events to it.

      I haven't even included registering events, because that's a little more complex, but the basic outline is that when any of the registered events occur, war3 executes all of the conditions/boolexprs attached to the trigger-handle, then if they all return true, war3 then proceeds to execute all of the actions attached to the trigger handle. What can be confusing about the registration of events, is that Blizzard could only provide ones that they believed you'd want, and nothing more, therefore, you can be tremendously limited in what you can actually code for, although the events for spells opens up a huge number of options, which kept me satisfied for a while.
    4. Herman
      Herman
      What we've done, is create a variable of type trigger, named it 't', set what it will reference equal to the handle that will be created/returned from the function 'CreateTrigger()'. Next, we use a method that is specific to trigger handles, which attaches an action to the given handle. Here, we use the 't' variable to refer to the specific trigger/handle that we want the action to be attached to.

      A second parameter that is interesting is the 'codefunc' parameter. This uses an actual function, in our example that function is DoThis().

      The next method called for the handle is the TriggerAddCondition() function, which again, uses something similar to the 'codefunc', although it is actually a 'boolexpr', or boolean expression.

      I don't have time to go into boolean expressions, but they are a crucial piece in using trigger-handles.
    5. Herman
      Herman
      function OnlyIfThisIsTrue takes nothing returns boolean
      return true
      endfunction

      function DoThis takes nothing returns nothing
      endfunction

      function CreatingTriggers_InitTrig takes nothing returns nothing
      local trigger t = CreateTrigger()
      call TriggerAddAction(t, function DoThis)
      call TriggerAddCondition(t, Condition(function OnlyIfThisIsTrue))
      endfunction

      There is alot to be explained in these 3 functions, and the trigger still won't have an effect, because there is no event attached to our trigger handle.
    6. Herman
      Herman
      What the 'trigger' variable actual is is an integer that references data. But, you don't need to worry about that.

      What you need to understand, is that the trigger variable does not act as the trigger. The trigger variable is more like an arrow, or what most people refer to, a pointer. It references the trigger, but it is not the trigger handle.

      All handles work in this way, they can only be referenced by variables, but they are NOT the actual handle.

      On that note, handles that are leaked are handles that have not been destroyed. Due to some strange setup by Blizzard, even if you call the destroy function on a handle, there is a reference table that keeps track internally of how many variables are pointing to the handle. If there is still a variable pointing to a handle, the handle/data won't be removed properly by war3s' internal system, resulting in a memory leak.
    7. Herman
      Herman
      Last time I posted, I was easing into an explanation of creating a triggered effect in JASS.

      We know that the function with _InitTrig attached to its name is the function that is ultimately called by war3's main startup script.

      From here, we create a specific handle called a 'trigger'. The way this is done, is simply create a variable of variable-type 'trigger', give it a name, and set its value equal to the 'CreateTrigger()' function, which returns a trigger handle. Now, as you begin to understand how programming works, you could guess that there is no such thing as a 'trigger'. that 'trigger' is just a made-up symbol to help make an idea tangible.
    8. Freyleyes
      Freyleyes
      It sounds like a cool idea. You should enter it.
    9. Freyleyes
      Freyleyes
      Leave the requests and enter the contest, you might just win. Ima entering as well. I know the theme is a little weird but it can be cool.
    10. Freyleyes
      Freyleyes
      Are you entering the spells and mini contest #18?
    11. Shendoo2
    12. Shendoo2
      Shendoo2
      i was on your site awhile ago, and it had a way to protect your map. Do you think you go send me those steps again? thanks
    13. Herman
      Herman
      [I think 'hfoo' is the rawcode for footman]

      In the example, instead of using a player variable like the function says it takes, I used a function, Player(). This simple function converts an integer parameter into a player variable. The function itself returns the player variable, so I can use it in the CreateUnit() function as the 'player' variable-type parameter.

      On a sidenote, if you feel like I'm moving too slowly and the explainations are too drawn out, just ask questions and I'll fill you in on any info you might need at the moment.
    14. Herman
      Herman
      Quite a bit happening in that single line of code...

      Anyway, the unit handle is probably the biggest handle-type in war3 (cept the effect handle, which is just huge because its a whole animation)

      There are a sh*tload of methods that use the unit parameter, and because the unit handle is actually the units that run around on the screen, players have made many many many functions that use the unit variable as a parameter.

      For the most part, with handles, their methods either return or change the data already contained in them, for our unit, this could be the owner of the unit, the position of the unit the direction the unit is facing, and I don't believe there is a method for changing the unit-type. There might be others but those are the main ones.

      Lastly, the 'CreateUnit' function returns 'unit', which means a variable can be set to the function, and the variable will refer to the unit create in that original line whenever you use the variable.
    15. Herman
      Herman
      If you don't know how to find the rawcode of the unit-type, simply open the object editor, and press Cntrl+D, (I think), if you still can't find it just PM me.

      The next 3 parameters are reals, the first one represents the x-coordinate of where the unit will be placed, the second represents the y-coordinate, and the last represents the degrees that the unit will be facing on creation.
    16. Herman
      Herman
      You don't really need to know the difference between BJ's and natives, you'll pick up on it when you start writing scripts.

      The 'CreateUnit' function actually physically creates a unit in the 3D world, and it returns a unit, which a 'unit' variable-type can refer to.

      The parameters it needs to create the unit are...

      player id - The 'player' is the type of variable, and 'id' is just what the variable would be named in the function if you could see what it does. With natives, the variable names are just clues to what the variable does. Here, it is the owner of the unit
      (Btw, you can find functions online by searching the 'jass vault' on google)

      integer unitid - Now, this part is interesting, because this is how you tell the computer what unit-type you want created. The unitid is the rawcode of the unit-type, which you can find in the object editor (which can be frustrating, but it is necessary).
    17. Herman
      Herman
      (Btw, the 'unit' variable-type is a handle)

      function Example takes nothing returns nothing
      local unit u = CreateUnit(Player(0),'hfoo',10000,10000,270)
      endfunction

      There are a few things I should explain first.

      This is the syntax for the 'CreateUnit' function...


      ----------
      CreateUnit takes player id, integer unitid, real x, real y, real face returns unit
      ----------
      The 'CreateUnit' function is what is called a 'native' function, meaning that Blizzard created it, it can't be replaced by another user-created function (in rare cases they can be), and (generally) they are the most efficient functions. The last part usually pertains to using BJ's vs. using natives (BJ's are functions that do exactly the same thing as natives, except they call the natives, wasting a function call)
    18. Herman
      Herman
      Eh, its not as fun as it used to be. The newer online games like Gears, Halo, and fps types are just insane, and the main reason I played war3 was because you could play online with other players.

      I can post some more info about handles...

      Handles are large pieces of data treated like objects. A handle can have alot of different methods and data attached to them. One of the main obstacles of JASS was that one could not edit handles, you can edit the values and use their methods to make them do things, but you could not add your own methods and pieces of data that the handle would use. That was why vJASS came into existence, I'll explain that further later on, but for now we aren't up to vJASS quite yet.

      The most important aspect of handles that many many many people seem to never understand is that the variables that you would use with a handle, are NOT the actual handle. For instance...
    19. Paladon
      Paladon
      Dear deathdoorway,
      if you think i'm just sitting back without any things to do, you are completely wrong.
      I don't know your problem, but you seriously have one if you think "I've seen this somewhere else before" is somekind of insult.
      I closed the Spell Factory since we hadn't the time to work on such things anymore.
      Just to tie the things up, and to make it clear:
      I'm wishing you only the best for your factory, just as i said before.
      Why should i be mad about you?
      I'm thankful that so many new Spell Factorys take place.
    20. Herman
      Herman
      In the '_InitTrig', we define the events, conditions, and actions that will be attached to the trigger handle. (when you get better at vJASS and JASS, you'll find you can do more with the '_InitTrig' than you expected)

      Now, this is where a healthy understanding of handles is necessary.

      I need to take a break, in my next series of posts, I'll explain further about handles, and then specifically the trigger handle
  • Loading...
  • Loading...
  • About

    Birthday:
    March 14
    Home Page:
    http://www.freewebs,com/deathdoorway
    Location:
    United states
    Current Project:
    Covenant of Assassins ORPG
    WarCraft 3 Account:
    Deathdoorwa0
    WarCraft 3 Realm:
    US East
    Favourite Race:
    Blood Elf
    Favorite Organization/Clan:
    Bloodhoof
    Bored very eazy

    love map making

    love helpin ya

    warcraft n starcraft

    Interact

    Content:
    Yahoo! Messenger:
    philjr12@sbcglobal.net

    Signature

  • Loading...
  • Loading...