I made a simple script, that can with the Player with another Object (Game Object or Monster Object)... just a test for fun (has a lot of
Issues).
[media]https://youtu.be/wqWQHZAgeyg[/media]
1/ Add a new "User Constant" in the "Script Settings > User Constants" tab, name it "OBJ_PLAYER_XTRA" and give it the value of the object index you want to use for your Player to switch to, for this example, I used "14".
But HERE, you can change to any object index you want to use to with! (monster objects start from 16).
2/ Make a script named for example "SwithPlayerToXtraObject.asm", with this code:
3/ Add this script to your "Input Scripts" and add this script to the "PRESS" "Select" button for example. When you press select it switch the character (more fast one, or invincible one, ...)!
Voilà, it's just a small test script, do whatever you want with it.
In fact, I would not recommend to use this script
In your great game, because it’s full of bug
Need to work more on that before being useable.
Issues).
[media]https://youtu.be/wqWQHZAgeyg[/media]
1/ Add a new "User Constant" in the "Script Settings > User Constants" tab, name it "OBJ_PLAYER_XTRA" and give it the value of the object index you want to use for your Player to switch to, for this example, I used "14".
But HERE, you can change to any object index you want to use to with! (monster objects start from 16).
2/ Make a script named for example "SwithPlayerToXtraObject.asm", with this code:
Code:
;; change character to OBJ_PLAYER_XTRA
switchPlayerXTRA:
LDX player1_object
LDA Object_x_hi,x
STA newX
LDA Object_y_hi,x
STA newY
DeactivateCurrentObject
LDA playerToSpawn
BEQ goSwitchingPlayerXTRA
;; put back tehe initial player object
LDA #$00
JMP continueSwitchingPlayerXTRA
goSwitchingPlayerXTRA:
;; we use another one :
LDA #OBJ_PLAYER_XTRA
continueSwitchingPlayerXTRA:
STA playerToSpawn
LDA Object_scroll,x
STA temp3
CreateObject newX, newY, playerToSpawn, #$00, temp3 ;; currentNametable
TXA
STA player1_object
;PlaySound #SND_TRANSFORM
RTS
3/ Add this script to your "Input Scripts" and add this script to the "PRESS" "Select" button for example. When you press select it switch the character (more fast one, or invincible one, ...)!
Voilà, it's just a small test script, do whatever you want with it.
In fact, I would not recommend to use this script
In your great game, because it’s full of bug
Need to work more on that before being useable.