I need help with my project

For questions about using Classic.

Post » Thu Dec 31, 2009 4:21 am

OK !
finally i found a way to make it work, dont know if its the "right" way but its working.. but please comment on it :D

other thing that i cant figure out with the physics.. it so slow at stopping..
The speed and the contact damping is the way i like but its so slow to reach the point of zero speed, you can see the AV "speed" on the sprites what i'm talking about.

Anyways the file is here.
[url:12mwso29]http://internet.is/eski/shuffleboardThing.cap[/url:12mwso29]


edit: aahh.. took out some crap that i figured out :o

but there is a bug in the 0.99.97 construct...
If you have done some changes on a .cap file and quit the program it just shuts right off..
it doesnt ask you if you want to save the changes that you have maked.. didnt do this in version before this one :roll: (i think)
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Post » Sun Jan 03, 2010 7:41 pm

Okay eski, sorry for the delay. I got what you're looking for here, to help slow down your pucks faster.

I changed event 15 to this:

[code:3mk0s3gm]+ System: For each Sprite
-> Sprite: Set 'Speed' to sqrt(Sprite[Physics].VelocityX^2+Sprite[Physics].VelocityY^2)
-> Sprite: Set 'id' to Sprite.UID[/code:3mk0s3gm]

The way you had it before, you were just setting Speed to the X velocity. This combines the X and Y velocity to get total velocity. The ^2 also changes it so that you always get a positive number.

(You can thank Quazi for that one, he helped me figure that out in this thread: viewtopic.php?f=3&t=5330 which might be a good thread to read anyway since you're doing physics stuff in your game :))

Anyway, back to the .cap. I un-toggled the last event you had (event 22) and changed it to this:

[code:3mk0s3gm]+ Sprite: Pick by Sprite.Value('Speed') Greater than 0
+ Sprite: Pick by Sprite.Value('Speed') Lower than 2
-> Sprite: Set velocity to (0, 0)[/code:3mk0s3gm]

I used Sprite compare rather than System compare so the picking would work properly. You can find it in the Sprite conditions labeled "Pick by comparison." I used "Lower than 2" just to stop them faster, you could probably get away with 3 or 4 and it wouldn't look too weird.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jan 04, 2010 1:39 am

ahhh brilliant..
now its starting to feel good.

Next is improving the graphics and putting in some power ups.. nah.. just the graphics 8)

Thanks alot deadeye for the help and Quazi... :wink:
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest