spawn actor with unique numbers?
se7rn@me
London / Cape Town Member Posts: 11
Hi All,
Newbie here.
I'm struggling with the following:
I spawn 5 actors but want each of the 5 actors to have a unique reference point (Number). This should be displayed on screen too.
I've created a self attribute INDEX and tried changing the attribute to +1 for some reason its only displaying the default INDEX value of 0.
The change attribute was put before spawn..
Not really sure how to achieve this if it's even possible. Would any of you kind people out there point me in the right direction.
Would be much appreciated.
Comments
Hi there,
If you want each actor to contain that unique number, the actor has to grab and place that number somewhere. That is why you create a self integer attribute ( called NewValue in this example ) to hold that value.
So, when your actor logic, drag a change attribute to the top of the logic stack outside of any rules. Change self.NewValue to game.INDEX. This will grab the INDEX value and place it inside the self attribute.
Make sense?
If not, I can create a demo for you.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Hi Brandon,
Thanks for the prompt reply. It kinda make sense. If its not to much effort i would be grateful if you can create a demo for me.
I'll try what you suggested anyway.. Thank you very much.
@se7rn@me - Sure, let me whip that up really quick. Back in a moment.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@se7rn@me - Here you go.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
wow amazing. Thank you very much. Exactly what I wanted.
I'll check my existing code and see where i have gone wrong.
Again thank you very very much.