• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Almia
Reaction score
297

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • For the GUI, you mean like this? :
    Unit - Order DestChecker to Harvest Dest
    Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Current order of DestChecker) Equal to (==) (Order(harvest))
    Then - Actions
    Set IsDestTree = True
    Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    TreeKill Equal to (==) True
    Then - Actions
    Destructible - Kill Dest
    Else - Actions
    Else - Actions
    Set IsDestTree = False
    Unit - Order DestChecker to Stop
    Set IsDestTree = False
    Okay, will copy the script, thanks a lot :D

    Also, you mean after the order DestChecker to stop right?
    checked that tutorial. I see now, that's why it doesn't compile.

    edit
    so, I made a full GUI Version, along with the one I send you before into Full JASS, I packed them in one map.
    would you mind if I upload both version (packed into 1 Map) or the GUI/JASS Only (in this case, I will remove the one you don't allow me)?

    here's the code for JASS and Triggers for GUI :
    function IsDestTree_JASS takes nothing returns nothing
    set udg_DestChecker = null
    set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
    call ShowUnitHide( udg_DestChecker )
    endfunction
    function IsDestTree takes destructable d returns boolean
    return IssueTargetOrderById(udg_DestChecker,852018,d) and IssueImmediateOrderById(udg_DestChecker,851972)
    endfunction
    function DestroyTree takes destructable d returns nothing
    if IsDestTree(d) and GetWidgetLife(d) > 0.405 then
    call KillDestructable(d)
    endif
    endfunction

    //===========================================================================
    function InitTrig_IsDestTree_JASS takes nothing returns nothing
    local trigger t = CreateTrigger( )
    call TriggerAddAction( t, function IsDestTree_JASS )
    set t = null
    endfunction


    IsDestTree GUI Init
    Events
    Map initialization
    Conditions
    Actions
    Set Dest = No destructible
    Custom script: set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
    Unit - Hide DestChecker
    IsDestTree GUI
    Events
    Conditions
    Actions
    Unit - Order DestChecker to Harvest Dest
    Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Current order of DestChecker) Equal to (==) (Order(harvest))
    Then - Actions
    Set IsDestTree = True
    Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    TreeKill Equal to (==) True
    Then - Actions
    Destructible - Kill Dest
    Else - Actions
    Else - Actions
    Set IsDestTree = False
    Unit - Order DestChecker to Stop
    would you mind send me the test map where the code doesn't compile?

    edit

    here's the main and my test triggers :

    IsDestTree
    Events
    Map initialization
    Conditions
    Actions
    Set DestChecker = No unit
    Custom script: set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
    Unit - Hide DestChecker
    Custom script: endfunction
    Custom script: function IsDestTree takes destructable d returns boolean
    Custom script: return IssueTargetOrderById(udg_DestChecker,852018,d) and IssueImmediateOrderById(udg_DestChecker,851972)
    Custom script: endfunction
    Custom script: function DestroyTree takes destructable d returns nothing
    Custom script: if IsDestTree(d) and GetWidgetLife(d) > 0.405 then
    Custom script: call KillDestructable(d)
    Custom script: endif


    Example
    Events
    Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
    Set Dest = Barrel 0000 <gen>
    Custom script: if IsDestTree(udg_Dest) then
    Game - Display to (All players) the text: It's a Tree!
    Custom script: call DestroyTree(udg_Dest)
    Custom script: else
    Game - Display to (All players) the text: What's that?
    Custom script: endif


    hope that helps! :)

    also, changes my font :D
    seriously? it's broken? I try using normal WE & JNGP, both compiles well.
    I don't know if that script is needed, since it compiles well to me.

    I guess I will add that script to the header :)


    Will change the font.
    really? it doesn't compile? let me recheck.
    I'm pretty sure this should work (I use JNGP with vJass enabled, it doesn't throw errors to me)

    make sure these variables are available :
    DestChecker (Unit)
    sure, before I upload, here's the trigger :
    IsDestTree
    Events
    Map initialization
    Conditions
    Actions
    Custom script: set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
    Unit - Hide DestChecker
    Custom script: endfunction
    Custom script: function IsDestTree takes destructable d returns boolean
    Custom script: return IssueTargetOrderById(udg_DestChecker,852018,d) and IssueImmediateOrderById(udg_DestChecker,851972)
    Custom script: endfunction
    Custom script: function DestroyTree takes destructable d returns nothing
    Custom script: if IsDestTree(d) and GetWidgetLife(d) > 0.405 then
    Custom script: call KillDestructable(d)
    Custom script: endif


    what do you say? :)
    okay then :)
    It's also a good thing if you can improve what I have done :)

    the main purpose is to give normal user (ones without JNGP) ability to use IsDestTree :)
    Almia, I manage to remade your IsDestTree from vJASS into custom scripts, may I upload that version at Spell Section (it's fine if you don't :cgrin:)
    I've got an idea about a system...
    That system will merge all 'ifs' when checking abilities, the system calls a specific trigger where the user put his actions; is that make sense to you. is this make faster?
    first missiles doesn't move!?!?

    Edit
    Oh i get it :) you give me the unfinished system cuz i ask unfinished system too :D
    Well, what need is the calculation.... +Rep
    Well, since you need them for a game and the amount I figure I need to :smile: I have the odd notion to finish everything and then post. Although I figure most would rather have it one at a time. But as I do my work in the order of interest I figure some would find it unfair when others get theirs first even if they asked later. I have done that from time to time when I got a really good run, but heck.

    what type of borders and buttons?
    Well, since you need them for a game and the amount I figure I need to :smile: I have the odd notion to finish everything and then post. Although I figure most would rather have it one at a time. But as I do my work in the order of interest I figure some would find it unfair when others get theirs first even if they asked later. I have done that from time to time when I got a really good run, but heck.
    An update: I do have some of them finished, but as I was preparing for a wedding I attended yesterday and slept much of today, I have not finished all. But they are coming :smile:
    Hey bud can you look at my hero cam system.
    It has the ability to change height / rotation / attack angle.
    Can you tell me what you think ? Thanks bud.
    How could you be a Barry? :(

    EDIT: Oh my Almia is going away. Watch out for any skilled-in-triggering new member! It might be him.
    We are regret to inform you that the Barry group has been deleted.

    It was a fun ride. Thank you everyone :)
    Hah I know it is mad late to say thanks. But thanks for wishing me a happy birthday means a lot when it coincides with Christmas.
    I am assuming all seen from similar perspective as the example video you linked - Meaning sidescroll action view.
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top