Here is what I've tried doing in the on going weeks for the prototype before starting the assignment:
Heres the script screen shot:
default
{
state_entry()
{
llSetText("Fire!",<0,1,0>,2);
}
touch_start(integer total_number)
{
// Gets parent object position, rotation and front, establishes projectile speed
vector position = llGetPos();
float speed = 25;
rotation rot = llGetRot();
vector front = llRot2Fwd(rot);
//Sets trajectory based on front
vector velocity = speed*front;
llOwnerSay("Fire.");
//Fire "projectile" from the parent object
llRezObject("bullet", position, velocity, rot, 4);
}
}
{
state_entry()
{
llSetText("Fire!",<0,1,0>,2);
}
touch_start(integer total_number)
{
// Gets parent object position, rotation and front, establishes projectile speed
vector position = llGetPos();
float speed = 25;
rotation rot = llGetRot();
vector front = llRot2Fwd(rot);
//Sets trajectory based on front
vector velocity = speed*front;
llOwnerSay("Fire.");
//Fire "projectile" from the parent object
llRezObject("bullet", position, velocity, rot, 4);
}
}

No comments:
Post a Comment