Tiger-Boy
Posts : 586 Join date : 2014-11-26
| Subject: Zooming/Center on a winner of a round February 18th 2023, 8:28 am | |
| I have noticed that some characters, when they win a round, they are zoomed/centered. How do I manage to do this? | |
|
Tiger-Boy
Posts : 586 Join date : 2014-11-26
| Subject: Re: Zooming/Center on a winner of a round February 18th 2023, 8:00 pm | |
| Thanks to XGargoyle for his advice; I checked the Win Coding of one of the chars that when he wins, he is centered (Hugo). And I found this: - Spoiler:
[State 181,CAMERA] type = helper trigger1 = pos X != 0 trigger1 = Time = 0 name = "helper1" id = 6001 pos = 0,0 postype = p1 stateno = 6001 helpertype = normal ownpal = 1 keyctrl = 1
This coding is tied to another coding in the Helpers State File: - Spoiler:
[Statedef 6001] type = S physics = S anim = 0 ctrl = 0
[state 6001,TURN] type=turn trigger1=ishelper(6001) trigger1=facing!=root,facing ignorehitpause=1
[State 6001,vel] type = VelSet trigger1 = parent,pos X > 0 x = ifelse(facing = 1,4,-4) [State 6001,vel] type = VelSet trigger1 = parent,pos X < 0 x = ifelse(facing = 1,-4,4) [State 6001,vel] type = VelSet trigger1 = parent,pos X = [-5,5] x = 0
[State 6001, WIDTH] type = Width trigger1 = 1 value = 1,1
[State 6001, NHB] type = NotHitBy trigger1 = 1 value = SCA time = 1
[State 6001,AS] type = AssertSpecial Trigger1 = 1 flag = invisible flag2 = noshadow
[State 6001,Bound] type = ScreenBound trigger1 =1 value =1 movecamera = 320,0 [State 6001,push] type = PlayerPush trigger1 =1 value = 0
[State 6001, Destroyself] type = destroyself trigger1 = Time = 50 trigger1 = enemy, Life >= 1 trigger2=numhelper(6001)>=2
And this works! However, in some cases, the camera Zooms out, instead of staying in a normal zoom, or zoom in: How do I manage for the camera to stay in Zoom, or zoom in when the char wins the round? | |
|