help convert this pls

takethat

Active Member
Reaction score
12
actually i just need those unit attach able to attack while sticking on the hero

gui move instantly will cancels thier attack,
jass or pseudo also can, please help convert this to use GetUnitX and GetUnitY

Trigger:
  • Interceptor2
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Int_Temp = 2
      • Set Point_Temp = (Position of Unit_Hero[Int_Temp])
      • Set Point_Temp2 = (Point_Temp offset by 12.00 towards ((Facing of Unit_Hero[Int_Temp]) + 85.00) degrees)
      • Unit - Move Unit_WG_L1[Int_Temp] instantly to Point_Temp2, facing (Facing of Unit_Hero[Int_Temp]) degrees
      • Set Point_Temp3 = (Point_Temp offset by 12.00 towards ((Facing of Unit_Hero[Int_Temp]) - 85.00) degrees)
      • Unit - Move Unit_WG_R1[Int_Temp] instantly to Point_Temp3, facing (Facing of Unit_Hero[Int_Temp]) degrees
      • Custom script: call RemoveLocation( udg_Point_Temp)
      • Custom script: call RemoveLocation( udg_Point_Temp2)
      • Custom script: call RemoveLocation( udg_Point_Temp3)


thx
 

Chocobo

White-Flower
Reaction score
409
Unit - Move Unit_WG_L1[Int_Temp] instantly to Point_Temp2, facing (Facing of Unit_Hero[Int_Temp]) degrees

-->
Custom script: call SetUnitX(udg_Unit_WG_L1[udg_Int_Temp], GetLocationX(udg_Point_Temp2))
Custom script: call SetUnitY(udg_Unit_WG_L1[udg_Int_Temp], GetLocationY(udg_Point_Temp2))



Unit - Move Unit_WG_R1[Int_Temp] instantly to Point_Temp3, facing (Facing of Unit_Hero[Int_Temp]) degrees

-->
Custom script: call SetUnitX(udg_Unit_WG_R1[udg_Int_Temp], GetLocationX(udg_Point_Temp3))
Custom script: call SetUnitY(udg_Unit_WG_R1[udg_Int_Temp], GetLocationY(udg_Point_Temp3))


if you fall on errors on the script while saving, post back here.
 

takethat

Active Member
Reaction score
12
what is function?

Global variables:
Integer: Int_temp
Point/location: Point_Temp, Point_Temp2, Point_Temp3
Unit : Unit_Hero(), Unit_WG_L1(), Unit_WG_R1()

these are being use in this trigger,
 

Emu.Man00

New Member
Reaction score
41
Are you sure you wrote the custom scripts right?

[udg_Int_Temp]

Has to be in square brackets.
 

takethat

Active Member
Reaction score
12
it work now, when theres a trigger refers to the said unit, the location is right,

however, the model itself doesnt follow.

meaning :

the camera is lock on the unit,
the model stays at the original location when i order it to move to a certain place, the camera follows but the model doesnt.

wats the problem of this?

does any 1 had any idea whats the problem?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216

function Act takes nothing returns nothing
local INT_TEMP = 2
local real X1 = GetUnitX(udg_Unit_Hero[INT_TEMP])
local real Y1 = GetUnitY(udg_Unit_Hero[INT_TEMP])
local real X2 = PolarProjectionX(X1,12,GetUnitFacing(udg_Unit_Hero[INT_TEMP]) + 85)
local real Y2 = PolarProjectionY(Y1,12,GetUnitFacing(udg_Unit_Hero[INT_TEMP]) + 85)
local real X3 = PolarProjectionX(X1,12,GetUnitFacing(udg_Unit_Hero[INT_TEMP]) - 85)
local real Y3 = PolarProjectionY(Y1,12,GetUnitFacing(udg_Unit_Hero[INT_TEMP]) - 85)
call SetUnitX(udg_Unit_WG_L1[INT_TEMP],X2)
call SetUnitY(udg_Unit_WG_L1[INT_TEMP],Y2)
call SetUnitFacing(udg_Unit_WG_L1[INT_TEMP],GetUnitFacing(udg_Unit_Hero[INT_TEMP]))
call SetUnitX(udg_Unit_WG_R1[INT_TEMP],X3)
call SetUnitY(udg_Unit_WG_R1[INT_TEMP],X3)
call SetUnitFacing(udg_Unit_WG_R1[INT_TEMP],GetUnitFacing(udg_Unit_Hero[INT_TEMP]))
endfunction

function InitTrig_Interceptor2 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddAction(t,function Act)
set t = null
endfunction
 

takethat

Active Member
Reaction score
12
i guess i cant directly copy those code, error on every line if i do so.

basically i think Chocobo's is fine, the unit is actually following but the look of the model doesnt.

As in the following picture, the flame tower is the unit attached, but it left behind as the oject attach to move forward,

but the trigger to fire fireball from the tower still works, it fire from the point where the flame tower should be at

Funny_attachment2.jpg


i hardly understand how to implement jass,

btw, how to put spoiler tag?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top