Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,382 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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