change actor to another actor
iceheero
Member Posts: 3
thank you for reading my question in first place.
i want to creat the follow effect.
I have crt 2 actors already, say warrior and mage with different behaviors.
I want to touch a button and it chang in game from worrior to mage(with their uniqe behaviors).
is there anyhow i can do it?
Thanks for reading and thanks for answering in advnaced.
Comments
Hello @iceheero
Welcome to GSC and the Forums.
That's straightforward enough: make a boolean attribute, let's call it Switch.
Now in front of any Rules for the warrior actor, add
When Switch is false
This way, any other buttons pressed with movement rules, etc, will effect this actor only.
Similarly, in front of any rules you have already for your mage actor, add
When Switch is true
in front of all existing rules for it.
Now in your button to change control, put:
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks for your feedback
I have been trying to work it out for the pass 1 hr and tried the following method and it works but O am kind of stuck now.
What i have done is
creat an interger attribute (switch) in game 1, 2, 3, 4 as job 1, 2, 3, 4
crt 4 button job1, job2, job3, job4, when press each button (Switch change to regard number)
So here is what i have done so far.
starting actor set as job1
when I press job2 button job 1 actor destory and spawn job2 actor. it works only indivdule or say only once.
I tried to press job 1, 3, 4 after 1st change and it doesnt make any changes.
again appreciate for your help
Hi, right, I think I get what you're after...
So make your 4 actors to be spawned in the Inspector, each with a different colour, etc, I guess.
In the rules of the first one, put:
and in the 2nd:
etc. for 3 and 4
In your button 1, you should have something like:
In your button 2:
etc. for the other two buttons.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
some thing like it but a bit different. anyway thanks for your help it helps me to get what i want.
thanks ^^
The "bit different" is probably the bit that makes sure it works for you this time!
Glad it helped.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
yes i crt 4 jobs with unique job number in each jobs.
So anytime I press job1 it checks the character's job number.
if switch number = job2 number
destory
spawn job2 actor
so on for job 2 , 3 .
and so on for button 2,3,4
and looks like it works at mean time.
anyway thanks for your help and it helps