Hi this is X.x-D.a.r.K-x.X
This is one variation of many triggers in my maze. I don't necessarily need help, but I'd rather someone do the thinking for me since I'm never gonna do it.
This is my ferris wheel trigger...
function Trig_Nine_1_Actions takes nothing returns nothing
local integer x = 1
set udg_RealLevel9[1] = GetRectCenterX(gg_rct_Region_884) + (udg_i * 2) * CosBJ(udg_UnitAngleLevel9[1] + 360)
set udg_RealLevel9[2] = (udg_i * 2) + (udg_i * 2) * SinBJ(udg_UnitAngleLevel9[1] + 360)
call SetUnitX( udg_UnitLevel9[1] , udg_RealLevel9[1])
call SetUnitFlyHeightBJ( udg_UnitLevel9[1], udg_RealLevel9[2], 99999)
set udg_UnitAngleLevel9[1] = udg_UnitAngleLevel9[1] + 1
//--------------------------------------------------//
set udg_RealLevel9[3] = GetRectCenterX(gg_rct_Region_884) + (udg_i * 2) * CosBJ(udg_UnitAngleLevel9[2] + 90)
set udg_RealLevel9[4] = (udg_i * 2) + (udg_i * 2) * SinBJ(udg_UnitAngleLevel9[2] + 90)
call SetUnitX( udg_UnitLevel9[2] , udg_RealLevel9[3])
call SetUnitFlyHeightBJ( udg_UnitLevel9[2], udg_RealLevel9[4], 99999)
set udg_UnitAngleLevel9[2] = udg_UnitAngleLevel9[2] + 1
//--------------------------------------------------//
set udg_RealLevel9[5] = GetRectCenterX(gg_rct_Region_884) + (udg_i * 2) * CosBJ(udg_UnitAngleLevel9[3] + 180)
set udg_RealLevel9[6] = (udg_i * 2) + (udg_i * 2) * SinBJ(udg_UnitAngleLevel9[3] + 180)
call SetUnitX( udg_UnitLevel9[3] , udg_RealLevel9[5])
call SetUnitFlyHeightBJ( udg_UnitLevel9[3], udg_RealLevel9[6], 99999)
set udg_UnitAngleLevel9[3] = udg_UnitAngleLevel9[3] + 1
//--------------------------------------------------//
set udg_RealLevel9[7] = GetRectCenterX(gg_rct_Region_884) + (udg_i * 2) * CosBJ(udg_UnitAngleLevel9[4] + 270)
set udg_RealLevel9[8] = (udg_i * 2) + (udg_i * 2) * SinBJ(udg_UnitAngleLevel9[4] + 270)
call SetUnitX( udg_UnitLevel9[4] , udg_RealLevel9[7])
call SetUnitFlyHeightBJ( udg_UnitLevel9[4], udg_RealLevel9[8], 99999)
set udg_UnitAngleLevel9[4] = udg_UnitAngleLevel9[4] + 1
loop
exitwhen x>11
if udg_IntegerLevel9[x]==1 then
call SetUnitX(udg_Hero[x], udg_RealLevel9[1])
call SetUnitY(udg_Hero[x], GetRectCenterY(gg_rct_Region_884))
call SetUnitFlyHeightBJ( udg_Hero[x], udg_RealLevel9[2], 99999)
elseif udg_IntegerLevel9[x]==2 then
call SetUnitX(udg_Hero[x], udg_RealLevel9[3])
call SetUnitY(udg_Hero[x], GetRectCenterY(gg_rct_Region_884))
call SetUnitFlyHeightBJ( udg_Hero[x], udg_RealLevel9[4], 99999)
elseif udg_IntegerLevel9[x]==3 then
call SetUnitX(udg_Hero[x], udg_RealLevel9[5])
call SetUnitY(udg_Hero[x], GetRectCenterY(gg_rct_Region_884))
call SetUnitFlyHeightBJ( udg_Hero[x], udg_RealLevel9[6], 99999)
elseif udg_IntegerLevel9[x]==4 then
call SetUnitX(udg_Hero[x], udg_RealLevel9[7])
call SetUnitY(udg_Hero[x], GetRectCenterY(gg_rct_Region_884))
call SetUnitFlyHeightBJ( udg_Hero[x], udg_RealLevel9[8], 99999)
endif
set x=x+1
endloop
endfunction
function InitTrig_Nine_1 takes nothing returns nothing
set gg_trg_Nine_1=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Nine_1,.01)
call TriggerAddAction(gg_trg_Nine_1,function Trig_Nine_1_Actions)
endfunction
the bottom part is something else where i actually use the ferris wheel.
The problem is that this trigger runs when the map starts, even though i turned it off and turn it on when the level starts. I assumed it was because the loop constantly running. Either way telling me how to fix this and make it turn off before I run the level would help. thanks
Trigger Help
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
- 3ICE
- Admin
- Posts: 2629
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Trigger Help
If it was turned off, the InitTrig function would have a TriggerDisable() line. Try adding it manually.
Re: Trigger Help
i dont follow, are you saying to add that line to the trigger itself or the trigger that enables it to run?
- 3ICE
- Admin
- Posts: 2629
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Trigger Help
You can solve that by making sure the trigger is disabled for real in the InitTrig section.Race wrote:The problem is that this trigger runs when the map starts, even though i turned it off
Enabling it to run would be TriggerEnable()Race wrote:the trigger that enables it to run?
Who is online
Users browsing this forum: No registered users and 394 guests