Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 609 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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