Changing player object upon warp-into flagged screen

dale_coop

Moderator
Staff member
Glad it's working :)

It would be possible to play a player victory animation before your victory object... but, something, easier, would be to use your actual Victory object...
make an animation using your character (dancing or happy or what you want), assign it to the Action Step 0 of your Victory object, then for "end of animation" instead of "warp to screen", set to "Advance", use now the Victory animation for your Action Step 1 with an "End of animation" to "Warp to screen".
I think your Victory animation is big enough to contain your player victory dance...?
 

Raftronaut

Member
dale_coop said:
Glad it's working :)

It would be possible to play a player victory animation before your victory object... but, something, easier, would be to use your actual Victory object...
make an animation using your character (dancing or happy or what you want), assign it to the Action Step 0 of your Victory object, then for "end of animation" instead of "warp to screen", set to "Advance", use now the Victory animation for your Action Step 1 with an "End of animation" to "Warp to screen".
I think your Victory animation is big enough to contain your player victory dance...?


Hey Dale!

Yes I guess the problem is that my Victory object is connected to my Van Chr file and Van Palette, where as my Maze player is connected with it's own CHR file and Palette.

My Death object is using the VAN's CHR file and Color Palette, which works fine. But player victory I'd like to use the animation I created in the Maze Runner's monster CHR and Monster Palette.
Since my final objective is to introduce other playable characters...using this victory animation state would hopefully work for all my playable characters (if I use the same animation state for victory)...


Does this make any sense? Maybe there is an easier way to do this, but I assumed this would work best due to my ultimate goal, so having CreateVictoryObject scriptplay animation state 4 then create victory object (from game object) would work the same for all 4 player animations..
 

dale_coop

Moderator
Staff member
Yep, I understand. So you should modify the NoMorePrize_CreateVictoryObject script to branch out when on a "single screen".
And create an monster Victory object instead of the normal one, in the particular situation.
Something like, for example (if the monster object #37 is your character Victory object)::

Code:
	LDA screenFlags
	AND #%10000000
	BEQ +
	;; character victory object:
	CreateObject temp, temp1, #37, #$00, currentNametable
	JMP ++
	+
	;; normal Victory:
	CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
	++
 

Raftronaut

Member
dale_coop said:
Yep, I understand. So you should modify the NoMorePrize_CreateVictoryObject script to branch out when on a "single screen".
And create an monster Victory object instead of the normal one, in the particular situation.
Something like, for example (if the monster object #37 is your character Victory object)::

Code:
	LDA screenFlags
	AND #%10000000
	BEQ +
	;; character victory object:
	CreateObject temp, temp1, #37, #$00, currentNametable
	JMP ++
	+
	;; normal Victory:
	CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
	++

Like this? :

Code:
		LDA screenFlags
	AND #%10000000
	BEQ +
	;; character victory object:
	CreateObject temp, temp1, #37, #$00, currentNametable
	JMP ++
	+
	;; normal Victory:
	CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
	++
	
	TXA
	STA tempx
	LDX player1_object
	LDA Object_x_hi,x
	STA temp
	LDA Object_y_hi,x
	STA temp1
	CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
	LDX player1_object
	DeactivateCurrentObject
	LDA #$01
	STA loadObjectFlag
	StopSound
	LDA #$ff
	
	PlaySound #SND_VICTORY
	LDX tempx

I set it up bu doesn't seem to be working. I'll need to play with it some more yet
 

Raftronaut

Member
Ahhh I see, your code here is calling for a new monster object rather than a monster animation.

So this would require creating a new monster just for purpose of victory?
 

dale_coop

Moderator
Staff member
Exactly, a new object. A "Monster" Victory object. So you could use monster CHR graphics.
It is the simplest (and working) solution.
 
Top Bottom