• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

KB3D - Knock back 3D

Status
Not open for further replies.
Level 22
Joined
Sep 24, 2005
Messages
4,821
*Chobibo for helping in Script Fixes -> WEHZ & T&S Helpers for helping in script fixes.

I do not want to be solely credited, I helped you because I am part of this group, if you mention me and not the group then please remove my username. I jest not.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Thank you for your cooperation, hunter mode is now deactivated, target is set to null (was previously Malhorne).
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
i made this as a variable creator trigger (alone) and it kept showing errors
JASS:
function Trig_KB3D_Variable_Creator_Actions takes nothing returns nothing
    set udg_CP_HiddenItems[0] = null
    set udg_CP_HiddenItemsIndex = 0
    set udg_CP_HiddenItemsIndex = 0
    set udg_CP_Item = null
    set udg_CP_Point = null
    set udg_CP_PointIsWalkable = false
    set udg_CP_Rect = null
    set udg_KB3D_Accel = 0.00
    set udg_KB3D_Angle = 0.00
    set udg_KB3D_CW_HiddenItems[0] = null
    set udg_KB3D_CW_HiddenItemsIndex = 0
    set udg_KB3D_CW_Item = null
    set udg_KB3D_Counter = 0
    set udg_KB3D_DestroyTree = false
    set udg_KB3D_DisableUnit = false
    set udg_KB3D_Fx = ""
    set udg_KB3D_Fx_Attach = ""
    set udg_KB3D_HA = null
    set udg_KB3D_Harvester = null
    set udg_KB3D_Instances = 0
    set udg_KB3D_Range = 0.00
    set udg_KB3D_Speed = 0.00
    set udg_KB3D_Targeted_Unit = null
    set udg_KB3D_Unit = null
    set udg_KB3D_UnpathableStop = true
    set udg_KB3D_Zoffset = 0.00
endfunction

//===========================================================================
function InitTrig_KB3D_Variable_Creator takes nothing returns nothing
    set gg_trg_KB3D_Variable_Creator = CreateTrigger(  )
    call TriggerAddAction( gg_trg_KB3D_Variable_Creator, function Trig_KB3D_Variable_Creator_Actions )
endfunction

EDIT: if you can, add yourself a variable creator since mine doesn't change anything
and even thought, maybe the problem isn't that there is a variable creator trigger
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Still..............
  • KB3D Variable Creator
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CP_HiddenItems[0] = No item
      • Set CP_HiddenItemsIndex = 0
      • Set CP_HiddenItemsIndex = 0
      • Set CP_Item = No item
      • Set CP_Point = CP_Point
      • Set CP_PointIsWalkable = False
      • Set CP_Rect = No region
      • Set KB3D_Accel = 0.00
      • Set KB3D_Angle = 0.00
      • Set KB3D_CW_HiddenItems[0] = No item
      • Set KB3D_CW_HiddenItemsIndex = 0
      • Set KB3D_CW_Item = No item
      • Set KB3D_Counter = 0
      • Set KB3D_DestroyTree = False
      • Set KB3D_DisableUnit = False
      • Set KB3D_Fx = <Empty String>
      • Set KB3D_Fx_Attach = <Empty String>
      • Set KB3D_HA = KB3D_HA
      • Set KB3D_Harvester = No unit
      • Set KB3D_Instances = 0
      • Set KB3D_Range = 0.00
      • Set KB3D_Speed = 0.00
      • Set KB3D_Targeted_Unit = No unit
      • Set KB3D_Unit = No unit
      • Set KB3D_UnpathableStop = True
      • Set KB3D_Zoffset = 0.00
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Malhorne's right.
EDIT:
File -> Preferences -> General Tab -> check Automatically create unknown variable while pasting trigger data
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
i checked it chobibo, but the NORMAL WE tells me this:
33fc.png
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
udg_KB3D_Loop's data type must have been undeclared?
check the variable editor if it's the right type i.e. trigger.
EDIT: Yeah Malhorne's right again, what a guy!
EDIT 2: We should make a shrine to Malhorne, with flowers and stuff.
 
Level 18
Joined
Sep 14, 2012
Messages
3,413
NONO !
Generated triggers variables got the prefix : gg_trg

When you convert a GUI trigger :
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
 
Level 18
Joined
Sep 14, 2012
Messages
3,413
JASS:
function InitTrig_KB3D takes nothing returns nothing
    ////////LOOP
    set gg_trg_KB3D = CreateTrigger(  )
    call TriggerRegisterTimerEvent( gg_trg_KB3D, 0.031250000, true )
    call TriggerAddCondition( gg_trg_KB3D, function KB3D_Loop_Actions )
    call DisableTrigger( gg_trg_KB3D )
    ////////REGISTRATION
    set udg_KB3D_Registration = CreateTrigger(  )
    call TriggerAddCondition( udg_KB3D_Registration, function KB3D_Registration )
    set udg_KB3D_Harvester = CreateUnit(Player(15), 'hpea', 0, 0, 0)
    call ShowUnit(udg_KB3D_Harvester, false)
    call UnitAddAbility(udg_KB3D_Harvester, 'Aloc')
    set udg_KB3D_HA = InitHashtable()
    ////////Check Walkability System by PnF
    set udg_CP_Rect = Rect(0, 0, 128.00, 128.00)
    set udg_CP_Item = CreateItem('wtlg', 0, 0)
    call SetItemVisible( udg_CP_Item, false )
endfunction
Delete the variable Loop of type trigger.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
okay DOWNLOAD

Bribe;2000658 said:
That's why I named this Knockback 2D, because I plan to release
a Knockback 3D at some point :p

@ zv27, what knockback are you referring to? This code does better
than any knockback I've seen in regards to handling collision sizes.
For example, Berb's Knockback Lite, where I got the formulas from,
uses an item to check for pathing which is limited to size 16 collision
and will therefore throw units into impassible terrain much of the
time. This system needs to be more complex than his in order to
avert the bugginess.
 
Status
Not open for further replies.
Top