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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,253 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
[NEWTON] removing an entity #60544
12/14/05 16:33
12/14/05 16:33
Joined: Sep 2005
Posts: 159
The Netherlands
D
Dutchie666 Offline OP
Member
Dutchie666  Offline OP
Member
D

Joined: Sep 2005
Posts: 159
The Netherlands
what is the correct way to remove a newton gravity entity?

when i use ent_remove(me) at an entity i get this error:

Code:

Error E1515
Invalid arguments in NewtonMaterialGetSoundEffect: ENT_playSOUND(my,sound,volume)




i use this as script for my entity:
Code:

function move_grenade(){
var collisionType = 0;

var body;
body = NewtonAddMapEntity (my, collisionType);

NewtonSetBodyMass (body, 1);
NewtonSetBodyLinearDamp (body, 0.1);
NewtonSetBodyAngularDamp (body, 0.3, 0.3, 0.1);
NewtonSetBodyForceAndTorque (body, ApplyGravityForceEvent);
NewtonSetBodyMaterial (body, wood_material);
NewtonSetBodyActiveState (body, 1);
NewtonSetBodyAutoActiveState (body, 1);

newtonImpulseRecord[0]=player.x;
newtonImpulseRecord[1]=player.y;
newtonImpulseRecord[2]=player.z;

newtonImpulseRecord[3]=player.x;
newtonImpulseRecord[4]=player.y;
newtonImpulseRecord[5]=player.z - 100;


newtonImpulseRecord[6]=1;


newtonImpulseRecord[7]=8000;

NewtonBodyAddImpulse(NewtonGetBody(me),newtonImpulseRecord);

sleep(2);

ent_create(explosion,my.pos,genade_explode);
ent_remove(me);
}



Re: [NEWTON] removing an entity [Re: Dutchie666] #60545
12/14/05 17:26
12/14/05 17:26
Joined: Sep 2005
Posts: 159
The Netherlands
D
Dutchie666 Offline OP
Member
Dutchie666  Offline OP
Member
D

Joined: Sep 2005
Posts: 159
The Netherlands
already found it, it is:
NewtonRemoveEntity(me);


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