TAN: CONTROLLER.SCRIPT
Controls everything
PURPLE:SYNC.SCRIPT
Talks to the controller scipt
BLUE:GAME.COLLECTION
U are the red cube named hero.game object
Collide with white cubes and u go to death collection
RED:DEATH.COLLECTION
U are the white cube ala ghost
Touch red cube to revive and go back to game collection
HERO_SYNC.SCRIPT
GHOST_SYNC.SCRIPT
This here the revive block sends the ghost script its position so it looks like the ghost took over the reviver block
MAIN COLLECTION
Whats going on here is there is a main collection that controls whats happening with sync and controller script , u start off in the menu collection(not relevant in this problem) then u go to blue,spawning in the center, then when u die u go to death collection,spawning in the location u died from the game collection(where hero and white bullet collide), and when u touch the reviver as the ghost u go back to game collection and spawn from where u collide with the red block(i call it the reviver) and back to death collection from where u died and so on
What im trying to do is when red block(you) in the game collection collide with the white bullet, the hero-sync script gets a message called “kill” and when it does it gets its own position and send it to the sync script
When the sync script recieve the message hero_dead along with its content(the hero’s position, sync script send the stuff to controller script as “kill”
When controller recieved “kill” it unload the game proxy, load the death proxy and sends the ghost sync script the heros position, for the ghost to set its own position
But when I die in the game collection and go to the death collection, it gives me this error
I do not have a single clue how to fix this I tried everything
Also can soemone tell me in what conditions this error occur
Solution:
Contoller. Script