• 🏆 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!

[Trigger] Need some PRO-triggerer to help fix bugs and find leaks..

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
772
I'm working on a simple AOS map that I've created for many years ago and stopped working on it when I got tired of all bugs and leaks in it. There is alot of things that need to be fixed. Many spells with a "knockback-effect" makes unit getting through trees and gets stuck in there and the multiboard that shows Hero, Unit and Total Kills dissappears when a players leaves the map and shows the statistic of the leaving player instead and I want players in the multiboard to be ranked, the player with most Total Kills should be in the top and the one with least Total Kills in the bottom.. There is surely alot of more leaks and bugs that I haven't found yet and I would like some PRO-triggerer to help me with the bugs and leaks. Ofc I'll give rep..
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
about tree thing, maybe this help:

copy this to map header
JASS:
function InitTrig_initTerrainWalk takes nothing returns nothing
    set udg_TW_MAX_RANGE = 10
    set udg_TW_X = 0
    set udg_TW_Y = 0
    set udg_TW_r = Rect(0, 0, 128, 128)
    set udg_TW_check = CreateItem('ciri', 0, 0)
    call SetItemVisible(udg_TW_check, false)
    set udg_TW_hiddenMax = 0 
endfunction

function HideBothersomeItem takes nothing returns nothing
    if IsItemVisible(GetEnumItem()) then
        set udg_TW_hidden[udg_TW_hiddenMax] = GetEnumItem()
        call SetItemVisible(udg_TW_hidden[udg_TW_hiddenMax], false)
        set udg_TW_hiddenMax = udg_TW_hiddenMax + 1
    endif
endfunction

function IsTerrainWalkable takes location loc returns boolean
local real x = GetLocationX(loc)    
local real y = GetLocationY(loc)    
    call MoveRectTo(udg_TW_r, x, y)
    call EnumItemsInRect(udg_TW_r, null, function HideBothersomeItem)

    call SetItemPosition(udg_TW_check, x, y)//this unhides the item...
    set udg_TW_X=GetItemX(udg_TW_check)
    set udg_TW_Y=GetItemY(udg_TW_check)
    call SetItemVisible(udg_TW_check, false)//...so we must hide it again
    
    loop
        exitwhen udg_TW_hiddenMax <= 0
        set udg_TW_hiddenMax = udg_TW_hiddenMax - 1
        call SetItemVisible(udg_TW_hidden[udg_TW_hiddenMax], true)
        set udg_TW_hidden[udg_TW_hiddenMax] = null
    endloop
    
    return (x - udg_TW_X) * (x - udg_TW_X) + (y - udg_TW_Y) * (y - udg_TW_Y) < udg_TW_MAX_RANGE * udg_TW_MAX_RANGE
endfunction

then u can check easily if a point is pathable
like this

3 variable, Point1 & Point2 is point variables, Boolean is boolean variable

  • Set Point1 = (Position of (Triggering unit))
  • Set Point2 = (Point1 offset by 50.00 towards (Facing of (Triggering unit)) degrees)
  • Custom script: call RemoveLocation(udg_Point1)
  • Custom script: set udg_Boolean = IsTerrainWalkable (udg_Point2)
  • Custom script: call RemoveLocation(udg_Point2)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Boolean Equal to True
    • Then - Actions
      • -------- action if next point pathable --------
    • Else - Actions
      • -------- action if there a tree/building/etc --------
 
Level 14
Joined
Jul 19, 2007
Messages
772
Well I don't really use tools programs anymore because they often fucking up my map and makes i crash.. And I have no idea how to import JASS scripts. I'm really noobish of triggering and alot of people have helped me so I have no idea how to change them or what leaks on them. Maybe I can send u the map and u can insert that JASS script pls? Some help with the multiboard could also be nice..
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Well I don't really use tools programs anymore because they often fucking up my map and makes i crash.. And I have no idea how to import JASS scripts. I'm really noobish of triggering and alot of people have helped me so I have no idea how to change them or what leaks on them. Maybe I can send u the map and u can insert that JASS script pls? Some help with the multiboard could also be nice..

for this u dont need any knowleadge exclude u must create manually few variable

just check the screenshot

i can insert too, if u upload the map (but only tommorow coz i sleep soon)
 

Attachments

  • 1.jpg
    1.jpg
    60.5 KB · Views: 81
  • 2.JPG
    2.JPG
    10.7 KB · Views: 54
Status
Not open for further replies.
Top