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, 1 invisible), 18,758 guests, and 8 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
objects move wen touched #46314
05/18/05 20:42
05/18/05 20:42
Joined: Oct 2004
Posts: 363
M
mo1e Offline OP
Senior Member
mo1e  Offline OP
Senior Member
M

Joined: Oct 2004
Posts: 363
hey all how would i make it so an object is moved wen i walk into it or shoot it?

Re: objects move wen touched [Re: mo1e] #46315
05/18/05 21:03
05/18/05 21:03
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Make it a physics object and that is automatic as far as moving into it.
As to shooting, as long as the bullets are also physics objects, then it's automatic again. Otherwise, your shooting routine will have to use Trace Based event handling to apply a force directly to the object shot.

Re: objects move wen touched [Re: fastlane69] #46316
05/18/05 21:10
05/18/05 21:10
Joined: Oct 2004
Posts: 363
M
mo1e Offline OP
Senior Member
mo1e  Offline OP
Senior Member
M

Joined: Oct 2004
Posts: 363
k then in otherwords how do i make the entity physic?

Re: objects move wen touched [Re: mo1e] #46317
05/18/05 22:13
05/18/05 22:13
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Obvious.
Read the manual.

Re: objects move wen touched [Re: fastlane69] #46318
05/19/05 04:33
05/19/05 04:33
Joined: Oct 2004
Posts: 363
M
mo1e Offline OP
Senior Member
mo1e  Offline OP
Senior Member
M

Joined: Oct 2004
Posts: 363
i have cant find it anywhere lol well not how to make it physic lol

Re: objects move wen touched [Re: mo1e] #46319
05/19/05 08:15
05/19/05 08:15
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
easy, assign this action :

Code:
 
var earth_gravity[3] = 0,0, -886;

action physics_ent
{
phent_settype(my, PH_RIGID, PH_poly);
ph_setgravity ( earth_gravity );
phent_setmass(my, 10, PH_sphere);
phent_setfriction(my,10);
phent_setelasticity(my, 40, 1);
phent_setdamping ( my, 10, 25 );
}



regards,

EDIT: oops forgot the earth gravity variable :P

Last edited by dennis_fantasy; 05/19/05 09:59.

Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: objects move wen touched [Re: Helghast] #46320
05/19/05 09:57
05/19/05 09:57
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
forgot to tell, this code gives the assigned object a polygon collision, so no bounding box thing or w/e.
also good thing is, it doesnt explode on impact :P
anyway, tell me how you like it or not.

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: objects move wen touched [Re: Helghast] #46321
05/19/05 17:24
05/19/05 17:24
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Dennis was nice enough to give you a start. You should also DL the racer demo off the Conitec DL page and see it in action.

That should be plenty to get you started (and perhaps somewhere along the line you'll find the physics instructions in the manual )


Moderated by  HeelX, Spirit 

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