 |
|
 |
|
Advanced

Group: Elite Members
Posts: 89
Joined: 20-February 09
Member No.: 843,883
|
|
 |
|
 |

|
Launches a dumbfire rocket that flies straight ahead. Upon striking another person, it'll explode into a whole bunch of whatever payload you put into it.
In push-enabled zones it will fling your victim into oblivion before rezzing ######. In no-push zones it will still rezz ###### like crazy, but won't fling anyone.
Instructions Rez a sphere. Set size to X = 2.0, Y = .5, Z = .5. This step isn't necessary for the weapon to function, but it does make it look cooler. Add the first script. Add the second script. Add any object, preferably something like the Instant Choppa Man or the HL2 Barrel. Name it "payload". Take the completed rocket. Stick it into any weapon.
KUSTOMIZATION OPSHUNS See in the first script where it says:
llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1);It appears five times in a row just before the word "default" if you can't see it.
This line commands the rocket to rez your payload upon exploding. It's repeated five times by default, so when the rocket hits somebody it will rez five of your payload. You can cuntpaste the line even more if you want it to rez more ######. Or you can delete some if you want it to rez less ###### (but why would you want that?)
Also, you can change the number in the very first line (where it says float V = 8). You can toy around with it, but it's not recommended. This affects how far away ###### will be lobbed when the rocket asplodes.
Scripts Explosive Rocket
float V = 2; //Max random speed payload will be punted when rezzed. string Name = "payload"; //Name of payload vector VelRand() { float Angle = (integer)llFrand(360); Angle = Angle * DEG_TO_RAD; vector Unit = <llCos(Angle), llSin(Angle), V>; return (Unit * V); } explode() { vector vel = llGetVel() * 2147483647; llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE); llSetForce(<0,0,0>, TRUE); llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1); //Repeat this line as many times as you want. The more times you repeat it, the more ###### gets rezzed when the rocket asplodes. llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1); llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1); llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1); llRezObject(Name, llGetPos(), VelRand(), ZERO_ROTATION, 1); } default { state_entry() { llVolumeDetect(TRUE); llSetBuoyancy(1.0); llSetStatus(STATUS_DIE_AT_EDGE,TRUE); } collision_start(integer total_number) { explode(); } land_collision_start(vector pos) { explode(); } } Engine flame This is just the Fire Plume and Smoke script, but I have put it here for convenience.
// Derp, uses the default by default string cnfFlameTexture=""; ////////////////////////////////////////// default { state_entry() { llSetTimerEvent(0.05); } timer() { llParticleSystem([ PSYS_PART_FLAGS, PSYS_PART_WIND_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_EMISSIVE_MASK, PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, PSYS_PART_START_COLOR, <1.0,0.3,0.0>, PSYS_PART_END_COLOR, <1,1,0.0>, PSYS_PART_START_SCALE, <1,1,0>, PSYS_PART_END_SCALE, <0,.05,0>, PSYS_PART_START_ALPHA, 1.0, PSYS_SRC_TEXTURE, cnfFlameTexture, PSYS_PART_MAX_AGE, 1.2, PSYS_SRC_ANGLE_BEGIN, 0.0, PSYS_SRC_ANGLE_END, 45 * DEG_TO_RAD, PSYS_SRC_BURST_RATE, .05, PSYS_SRC_BURST_PART_COUNT, 10, PSYS_SRC_BURST_SPEED_MIN, .5, PSYS_SRC_BURST_SPEED_MAX, 1.5, PSYS_SRC_ACCEL, <0,0,3>]); } }
|