Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Bullet Script Question

Deanril Ceres
Registered User
Join date: 13 Nov 2006
Posts: 11
06-02-2008 20:27
I used the Free Bullet script found here: http://rpgstats.com/wiki/index.php?title=ExampleGun

Which works great actually! However theres a part not compiling and wondering how to make it compile, how should it look in the script. Also what exactly it does?

Part not Compiling:

From: someone
state_entry()
{
llSetPrimitiveParams([[[PRIM TEMP ON REZ|PRIM_TEMP_ON_REZ]], TRUE]); // unreliable
llSetStatus(STATUS_PHYSICS | STATUS_DIE_AT_EDGE, TRUE);
//llSetBuoyancy(1.0); // uncomment for slow bullets




Full Complete Script below:

From: someone
// Bullet // Ready Jack // 6.23.04 // 1.3

// The other safety precautions seem unreliable if the bullet crosses
// into another sim, but this die timer seems to work pretty well.
float gTimeToDie = 20.0;

default
{
state_entry()
{
llSetPrimitiveParams([[[PRIM TEMP ON REZ|PRIM_TEMP_ON_REZ]], TRUE]); // unreliable
llSetStatus(STATUS_PHYSICS | STATUS_DIE_AT_EDGE, TRUE);
//llSetBuoyancy(1.0); // uncomment for slow bullets
}

on_rez(integer start_param)
{
if (!start_param) return;

llCollisionFilter("", llGetOwner(), FALSE);
llSetDamage((float)start_param);
llCollisionSound("", 1.0); // cancel default sound
llSetTimerEvent(gTimeToDie);
}

collision_start(integer count)
{
integer type = llDetectedType(0);
if (type & AGENT) {
// tricky stuff like proprietary damage goes here
llDie();
} else if (llGetStartParameter()) {
//llDie(); // uncomment to disallow ricochet, unreliable
}
}

land_collision_start(vector pos) {
//if (llGetStartParameter()) llDie(); // uncomment for no-bounce, unreliable
}

timer()
{
llDie();
}
}


Any help would be greatly appreciated!
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
06-02-2008 21:03
llSetPrimitiveParams([PRIM_TEMP_ON_REZ,TRUE]);
Deanril Ceres
Registered User
Join date: 13 Nov 2006
Posts: 11
06-02-2008 21:19
Oh thanks!!