Need help for script [ i can pay for this ]

Hello,

I search during 2 weeks how swich a GameObject;

I mean : i have my player and i have 3 slot. in this slot, i can put monster. Before play i assign monster into this slot. When game start i want this [ when i clic on the slot, my player do a transform animation then monster take his place. I precise that each monster have their proper abilities and script]

Someone can help me?

Sory for this bad english ^^

hmmm… so you are saying that you need to switch a player slot with a monster slot? What do you have coded already? How was that coded?

Is this what you’re trying to do?

  • The user is able to control the player.
  • The user clicks on a monster slot.
  • Some sort of animation happens.
  • The monster appears, and the player disappears.
  • Now the user is able to control the monster.

If so, I think you need two player controller scripts – one attached to the player, and one attached to the monster. When you switch to the monster, disable the player and enable the monster. This should activate the controller script on the monster, allowing you to move it around. You will also need to set the monster’s transform to equal the player’s transform, so the monster starts in the correct position.

The more details you can give us, the easier it will be for us to help you. Some useful questions to answer would be:

  • Which part of what you’re trying to do is failing?
  • What’s happening instead?
  • Which scripts are attached to which GameObjects, and what do they do?
  • Show us the script you’re trying to use to switch from player to monster.

If what Zioth said is correct, a gamemaster script or some playermanager script might help you.