Jump to content

Help with Vertibirds


SmileyCat

Recommended Posts

I believe it's something like this (not sure how you're calling it or what objects you're using):

int iStage
float fTimer
ref rVertibird

Begin GameMode
if (iStage == 0)
	set rVertibird to Player.PlaceAtMe VertibirdObjID 1 ; place vertibird at player
	rVertibird.PlayGroup Forward 1 ; play the approach anim
	set iStage to 1

elseif (iStage == 1 && rVertibird.IsAnimPlaying == 0)
	rVertibird.PlayGroup Idle 1 ; play idle landed anim
	rVertibird.PlaceAtMe RobotObjID 1 ; place robot at the vertibird
	set fTimer to 2 ; delay before vertibird takes off
	set iStage to 2
	
elseif (iStage == 2)
	if (fTimer > 0)
		set fTimer to (fTimer - GetSecondsPassed)
	else
		rVertibird.PlayGroup Backward 1 ; play takeoff anim
		set iStage to 3
	endif
	
elseif (iStage == 3 && rVertibird.IsAnimPlaying == 0)
	set iStage to -1
	rVertibird.Disable
	rVertibird.MarkForDelete ; cleanup after it disappears

endif
End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...