Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Different Physic objects with the same action #210599
06/11/08 17:38
06/11/08 17:38
Joined: Jan 2002
Posts: 454
Germany
CD_saber Offline OP
Senior Member
CD_saber  Offline OP
Senior Member

Joined: Jan 2002
Posts: 454
Germany
Hi there!
Can anyone please help me? When I assign this action to only ONE entity, it works absolutely fine. But when i add other objects with the same action attached, the other ones do not react to the gravity (given by temp). How can I make the vector "temp" unique for each one? I think that is the problem...


var barrel_entity;
action barrel
{
barrel_entity = me;
c_setminmax(me);

my.shadow=on;
phent_settype(my,ph_rigid,PH_BOX);
phent_setmass(my,40,ph_cylinder);
phent_setfriction(my,100);
phent_setdamping(my,40,40);
phent_setelasticity(my,30,30);

while(1)
{
temp.x= 0;
temp.y= 0;
temp.z= -6000;
phent_addcentralforce( barrel_entity, temp );
wait(1);

}

Thank you!

Last edited by CD_saber; 06/11/08 18:26.

Ja, lach du nur du haariges Pelzvieh!
Re: Different Physic objects with the same action [Re: CD_saber] #210611
06/11/08 18:40
06/11/08 18:40
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
you dont have to "fake" the gravity.


see ph_setgravity in manual.

Last edited by Quadraxas; 06/11/08 18:40.

3333333333
Re: Different Physic objects with the same action [Re: Quad] #210626
06/11/08 19:10
06/11/08 19:10
Joined: Jan 2002
Posts: 454
Germany
CD_saber Offline OP
Senior Member
CD_saber  Offline OP
Senior Member

Joined: Jan 2002
Posts: 454
Germany
Thank you very much! It works fine now...

is there a way to give the objects a push (away from the players position - with the pan of the camera) when I press a key?


Ja, lach du nur du haariges Pelzvieh!

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