Advanced Question- need help- place position??
Good day all.
I have seven actors in a coloum facing vertically. So they are in top of each other. This is meant to be my power up area.
What i need to work out is how I can create a system where they know what number they are in line.
Because when one of the seven is used, it will active that power, destroy that power actor that just got touched and the actors above it need to move down by 100 to fill in the gap.
Then a new random power up will be created but it needs to know it is at the end if the line hence it will be number 7.
Is this possible?
Further info:
I tried a quick demo where there were two actors and when the bottom one was touched it got destroyed and the other one was set to interpolate to the other position. Am I able to interpolate self. Y position to self.y position - 60?
I tried and it went straight to negative 60.
I would prefer of it all could be done using Seven actors as this is how many different powerups I have.
Also I am working on previous version of GS currently until apple fixs my issue.
Thanks, and help would be great even if it's "give up" because that will make me find a way to prove it is posible.
All the best
JonApp
I have seven actors in a coloum facing vertically. So they are in top of each other. This is meant to be my power up area.
What i need to work out is how I can create a system where they know what number they are in line.
Because when one of the seven is used, it will active that power, destroy that power actor that just got touched and the actors above it need to move down by 100 to fill in the gap.
Then a new random power up will be created but it needs to know it is at the end if the line hence it will be number 7.
Is this possible?
Further info:
I tried a quick demo where there were two actors and when the bottom one was touched it got destroyed and the other one was set to interpolate to the other position. Am I able to interpolate self. Y position to self.y position - 60?
I tried and it went straight to negative 60.
I would prefer of it all could be done using Seven actors as this is how many different powerups I have.
Also I am working on previous version of GS currently until apple fixs my issue.
Thanks, and help would be great even if it's "give up" because that will make me find a way to prove it is posible.
All the best
JonApp
Comments
Again any help would be helpful, otherwise i guess i am on my own.
All the best
JonApp
Constrain Attribute: (self.myPower) To: (ceil( self.Position.Y/self.Size.Height ))
Thanks for trying to help
I can get the powers to work, that's not a problem, I just need it so that when they are on top of each other and for example the bottom power is activated. That actor will be destroyed and I need the rest of the other actors/powers to move Down and replace where the other one is,
I tried a simple way of doing it where it involved gravity and that it collides with each other and the invisiable wall. However the more that were on top of actors the more they got pushed into the the actor in front.
All the best
JonApp
WHEN ACTOR IS DESTROYED (your power actor in the slot) set boolean X (attribute) to TRUE.
Now inside each of your power actors in the slot, say...
When boolean x is TRUE- CHANGE POSITION Y-60 (and or however many pixels they need to move to the next slot).
This will make all of the powers slide down into the next slot. That should do it. Make sure to set the boolean back to FALSE after they slide into position, that way they can be triggered to TRUE again for the next round.
Work?
However any of the seven can be touched, so if the third one gets destroy i need only four five six and seven to move,
You put invisible actors underneath each power actor. These invisible actors act as invisible means to tell where the user touched. Let's make this easy for now and just use two stacks. So there's one column with two stacked actors atop each other. You have invisible actor 1 and invisible actor 2. Both are placed on top of one another. 1 is on top. 2 on bottom of it. Now create 2 BOOLEAN attributes for each (we'll call these slot1 and slot2). On start of level set both to TRUE. I'm using TRUE to indicate that the slot is currently active.
Now here's where the trick comes in. There is essentially two buttons we have here (on top of eachother). A power button and an invisible slot button. When user taps on FIRE he is in theory also tapping on INVISIBLE ACTOR 1. So two things will happen here.
1.) Whatever you have associated with tapping FIRE will happen. I.e. a spell is cast or whatever.
2.) When user taps on INVISIBLE SLOT 1 (which is really underneath it), turn boolean to FALSE.
3.) Put this line of code in all of your power actors... WHEN SLOT 1 Boolean is FALSE, change position y to whatever down.
Now I know what you're saying. But what if I tap on slot 3 or 4 or whatever. Simple.
Just make a rule inside each actor that when (lets say) slot 3 boolean is false, only power actors above slot 3 will move down. Etc. You get the idea.
Now another question you might be having is HOW do we know where a power actor is on the slot? Well you can say that when FIRE overlaps INVISIBLE ACTOR 2 that it's internal attribute (self attribute-which you'll have to make) changes to 2. And so on.
Does this make sense?
Again I'm sure someone's got a much simpler way around this, but wanted to make sure you weren't left hanging!
Cheers!
I don't quite get it because some of it I seem impossible to do so I decided to ask some simple questions and then add it all together.
1. What rule would I use or how can I tell if the slot is false judging from the actors number. So if actor is number 4, how can i say a rule that it recognizes I'd slot 5 is false. So if the game.(self. Slot +1)
So if self was 4 it would look for rules in 5. If self was 2 it would look for 3.
2. I tried a completely simpler way where I added gravity and then have zero bounce and have a rule that they collide with each other. They also have a rule which says when touch destroy self. There is a base that is non moveable which they can also collide with. Having only two actors stack works fine. However when more are added they go under each other a bit and go back to normal. Or if I destroy the first three the other four fall down but bounce a little with each other. What's going on there. I even watched all demos to make sure I was doing it right.
Thanks due helping everyone
All the best
JonApp
However if two are done at exact time it only moves down one square, not two, for some reason it doesn't check again and go down. Everything else works fine. Any advice would be great.
All the best
JonApp
I have started and have been going alright, but to be clear what i am after am after this:
I have one column and they move down when pressed but if i select more than 1 it doesn't work like the video.
Thanks for any help
All the best
JonApp
Now that you have decided to use tables -- this might help. (Its not exactly what you want, but could point you in the right direction.)
http://www.mediafire.com/download.php?eax12hx13t8c7ql
Thanks for the consistence replies.
I am trying to do what the video above does, I have it so that one block can get destroyed but when ever more than one gets destroyed the blocks only move down one tile, they don't go all the way.
If you need for info can you PM or anything.
All the best
JonApp
if you carn't get it work, could you not just use gravity?
That was our first attempted but when they collide on top of each other, they bounce even if bounceness is set to zero on everything. We then paid for someone to fix it but they said they can't because it's just the way GS dies things and that we should look for another way. That's why we are trying to find a work around. So no it wasn't a stupid question.
All the best
JonApp
on i side note they don't seem to bounce on the demo i knocked up
but only set the acceleration 100
What we noticed was that they showed a bit of bounce and movement. We were hoping for something smoother.
All the best
JonApp
Think again about the table demo. It it closer than you may realize. And it will point you in the right direction.
Did you notice that the two blocks with the "0" end up all the way to the left. And the blocks with numbers move all the way to the right (in the correct order). If you can do it with numbers, you can do it with colors.
Perhaps you didn't notice because it happens too fast? You can always slow down the sequence.
Yes I did notice it and I do say thank you. However all I need is what the video I posted does, I am looking at yours and thinking of ways to make it know when something is destroyed, i know how to make actors go in order, I just need it like the video, if you can help it would be great.
Or further explain you demo more if you think I can do it there.
All the best
JonApp
Try putting a new rule in each actor:
When attribute [self.myCellValue] = [0]
--Change Attribute [self.color.alpha] To: [0]
otherwise
--Change Attribute [self.color.alpha] To: [1]
1 actor but 12 rules!! you can destroy the actor, but i just moved it up so you can see whats going on.
Ive got a feeling your better of with tables (i dont understand them yet)
but this is an option for you
Yes that is what I wanted, hopefully it works the way I want. However looking into tables as well. Sent you PM.
@RThurman
Thanks, I better understand now of what is happening. I begin an five hour shift tonight so I should be tackling this bad boy.
All the best
JonApp
Thanks for sticking around and helping.
All the best
JonApp
Now -- how about sharing your new-found powers. Tell us how you solved this.