Moving objects to a position next to another object...

For questions about using Classic.

Post » Sat Jan 16, 2010 12:59 am

The subject doesn't explain very well, but it's impossible to get what I want said in a simple subject line. I'll show you the picture first:

Now the intended idea is that... You click on an Ability you want to equip... And one of those points moves down to fill in one of those slots. If you unequip a skill, one of those points moves back to the "Points Remaining" side-bench.

I wanted to do this in an effecient way where I'd only have to use one "Point" object, but it would probably be overly complex. All those "Point" objects you see are the same sprite. The "Point Slot" sprite next to the Abilities' names, however, are not. There's "PointSlot1", "PointSlot2", etc. ..."PointSlot3".

I kinda have it in a way where the farthest Point sprite to the right of "Points Remaining:" is selected to move to a slot. But moving it BACK is another story. How can I have it set where... say... "if Ability is unequipped" (in this case, global variable = 0) to then check for every blank spot at an offset of 32 pixels? The Hotspot of all those "Point' objects are spaced out by 32 pixels, and the objects themselves are 16 pixels. So in this case, I'd want an event that checks for a blank spot next to "Points Remaining:" every 32 pixels, and keeps checking. If a "Point" sprite is there, it moves to the next 32 pixels and checks THAT spot, and so on until there's an empty spot and designates that as its spot.

If that wasn't too difficult to understand what I was trying to do, and if anyone knows exactly how I can do what I want, maybe in a totally different method that what I think would work, however, let me know. ^^

P.S. Holy crap, not only does Construct glitch up, but so does its board. After that giant paragraph, right now, every thing I do in the text field, be it typing a letter like I am right now, or clicking anywhere on the text field with the mouse, is screwing up the scrolling so freaking bad. This text field is having a seizure as I type.
Posts: 164
Reputation: 1,728

Post » Sun Jan 17, 2010 1:08 am

If you have the stats stored in vars, you could loop on that value, creating a new sphere for each, and placing it on basex + (statvalue*slotwidth)
Posts: 1,445
Reputation: 4,665

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests