Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 12,726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
spreading balls out of an entity #306177
01/20/10 11:00
01/20/10 11:00
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
hey guys

I want an entity to spread out small balls once the entity dies.
those small balls represent experience for defeating the enemy and the charakter should be able to pick them up.

the collection of the balls is not the problem, but the spreading.

the small balls should randomly jump out of the entity and fall to ground. I use a model for the balls.
to tell the truth i dont even have a clue how to achieve this.



I would assume to set a random pan-value for the respective exp-balls and then somehow move them out of the entity. if it's hitting a wall or the ground it should "bounce" off it (maybe with the bounce vector) and getting slower so that the ball shortly after the spreading lays still on the ground, ready for the charakter to pick it up. but i don't know how to achieve this via script.

i hope that maybe you can help me!

best regards
Roxas

Last edited by Roxas; 01/20/10 11:00.
Re: spreading balls out of an entity [Re: Roxas] #306178
01/20/10 11:07
01/20/10 11:07
Joined: Mar 2009
Posts: 40
DR_Black Offline
Newbie
DR_Black  Offline
Newbie

Joined: Mar 2009
Posts: 40
Why dont you use physics engine?
For example you can active an entity as a "physics-enables" object this way:

phent_settype( BallEnt, PH_RIGID, PH_SPHERE);

Look the manual for detailed info.


every body got some dues in life to pay
Re: spreading balls out of an entity [Re: DR_Black] #306367
01/21/10 13:33
01/21/10 13:33
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
random pan, absolute movement force (when you want to tilt/roll your ball in flight) with vec_rotate and my.pan, the bouncing: x_speed -= time_speed, z_speed = 5 starting value => z_speed -= time_step; then with c_trace to the ground or EVENT_BLOCK change the sign of z_speed. It should work after some tweaking.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1