Questions about Resource Bar

For questions about using Classic.

Post » Sat Nov 22, 2008 10:46 pm

Hi everyone! This my first post, and i want to know if i can use the resource bar to drag into layouts some object, instead of re-creating the same sprite for every layout. If no, for what exactly i use this bar? For putting songs into the game file and what more? :wink: thanks :wink:
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sat Nov 22, 2008 11:05 pm

The resource bar is more for the songs and external file you may need to run the game (Text files or some other type of files) if you want a object to go between layouts check its properties and click Global on. It will always be in the layout then when you make a new one so you dont need to keep making the same sprite over and over....
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Sat Nov 22, 2008 11:25 pm

Thanks :D But wait... when i click "global", nothing change, in my new layout, the object do not appears automaticaly in the list. And other question, i selected Solid fo an object, but my platform controller sprite just pass through it! and the text that should say the lives, dont change when the Player colides with the spikes, as i programmed... Can u help me????
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sat Nov 22, 2008 11:52 pm

[quote="jakerpot":2k7v8pv3]when i click "global", nothing change, in my new layout, the object do not appears automaticaly in the list[/quote:2k7v8pv3]
No, but it will appear in the event sheet editor. You should be able to copy+paste your object to another layout, too.

[quote:2k7v8pv3]And other question, i selected Solid fo an object, but my platform controller sprite just pass through it![/quote:2k7v8pv3]
You must've done something wrong - click File - New - Template / Example, and open the simple platformer example. That shows how a platform behavior stops when it hits an object with the 'Solid' attribute.

[quote:2k7v8pv3]and the text that should say the lives, dont change when the Player colides with the spikes, as i programmed[/quote:2k7v8pv3]
How did you program it? You need to tell us, otherwise it's pure guesswork!

If you're new I'd highly recommend you complete the Ghost Shooter Tutorial.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Nov 23, 2008 12:31 am

Well, i already saw Ghost Shooter tutorial, i discovered that the check box of "solid" automaticaly uncheck when i exit the properties. But now i solved this problem, but the counter dont move when you colide with the spikes. Another thing; the ball doesn`t goes to the coordenates i indicated in the event. Just see the .cap right down and solve my problems :(

.Cap File / Rapidshare:
http://rapidshare.com/files/166441574/F ... s.cap.html

(it can only be downloaded 10 times, so please, use carefully!!)
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun Nov 23, 2008 1:37 am

You've gotten all your layouts and event sheets confused! You should give them appropriate names to make it clearer (not just layout X events).

On the layout 'Level 3' - the one which isn't working - check its properties (click an empty space in the layout or select it in the project bar). The 'event sheet' property is set to 'Layout 6 events'. If you look at the event sheet 'Layout 6 events', all it contains is an event to set Text3's text. So the collision event isn't even tested for Level 3!

'Layout 4 events' contains something like what you want, but it tests for a collision with Sprite7. The spikes in Level 3 are called Sprite3.

You should keep your project organised to avoid problems like this. Firstly, give everything proper names (objects, layouts and event sheets). Secondly, copy and paste the same object between layouts so you dont have multiple objects which look the same but are different (eg Sprite3, Sprite7 - confusing huh?). Finally, I'd make sure every layout has its own event sheet, and use a separate event sheet for common events (like for showing how many lives you have left). Add the event sheet in application properties, and in each layout that needs those events, add an Include in the layout's event sheets. That way, you shouldn't get confused with which layout is using which events.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Nov 23, 2008 1:52 am

thanks for the help Ashley, and by the way, The real problem with the lives, was that if you try to put an event that something happens if the object colide with something (like object1 colides with object2) the object 2 can`t be solid, because i tryed retrieving the solid atribute and it worked! and i puted it again and it fails, because the ball dont even colide with the spikes... it just stop falling...
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun Nov 23, 2008 2:03 am

Yeah, the platform behavior will make sure the object never overlaps a solid, so the collision event will never run. To get around this, make a little 'detector' sprite and always set its position to just beneath the ball. You can use that to check if it collides with a solid.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests