Jump to content

marcin1995 Sharple

Resident
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

3 Neutral

About marcin1995 Sharple

  • Rank
    Member
  1. Okay its not exactly the same thing but i got it to work now. I took my working version of the script and just replaced the color numbers with llGetColor(0) and added another script that changes the prim colors when chosen on the HUD. i dont really know why it didn't work before but i am happy now!
  2. Okay i tried it now differently with changing the prims color instead of the particle itself. I get no errors but also the particles wont trigger... integer particleTriggered = 0; particle() { { { llParticleSystem([ PSYS_PART_FLAGS,( 0 |PSYS_PART_INTERP_COLOR_MASK |PSYS_PART_INTERP_SCALE_MASK |PSYS_PART_WIND_MASK |PSYS_PART_EMISSIVE_MASK ), PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE , PSYS_PART_START_ALPHA,0.6, PSYS_PART_END_ALPHA,0, PSYS_PART_START_COLOR,llGetColor(0) , PSYS_PART_END_COLOR,llGetColor(0) , PSYS_PART_START_SCALE,<0.859,1.970,0>, PSYS_PART_END_SCALE,<0.777,1.780,0>, PSYS_PART_MAX_AGE,0.5, PSYS_SRC_MAX_AGE,0.0, PSYS_SRC_ACCEL,<0,0,0.0>, PSYS_SRC_BURST_PART_COUNT,1, PSYS_SRC_BURST_RADIUS,0, PSYS_SRC_BURST_RATE,0.05, PSYS_SRC_BURST_SPEED_MIN,0, PSYS_SRC_BURST_SPEED_MAX,0.0078125, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,3.125, PSYS_SRC_OMEGA,<0,0,0>, PSYS_SRC_TEXTURE, (key)"textureuuid", PSYS_SRC_TARGET_KEY, (key)"00000000-0000-0000-0000-000000000000" ]); } } } integer gON; integer gChan; integer gLisn; stopParticle() { llLinkParticleSystem(LINK_SET,[]); } default { state_entry() { gChan = (integer)("0xF" + llGetSubString(llGetOwner(),0,6))+11; gLisn = llListen(gChan,"","",""); gON = !gON; } run_time_permissions(integer perm) { if (perm) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); } } attach(key on) { if (on != NULL_KEY) { integer perm = llGetPermissions(); stopParticle(); gLisn = llListen(gChan,"","",""); if (perm != (PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION)) { llRequestPermissions(on, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); stopParticle(); gLisn = llListen(gChan,"","",""); } else { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); stopParticle(); gLisn = llListen(gChan,"","",""); } } else { stopParticle(); gLisn = llListen(gChan,"","","");; } } control(key owner, integer level, integer edge) { if (level & (CONTROL_FWD | CONTROL_BACK)) { particle(); llSetTimerEvent(0.5); } else if (edge & (CONTROL_RIGHT | CONTROL_ROT_RIGHT)) { particle(); llSetTimerEvent(0.5); } else if (edge & (CONTROL_LEFT | CONTROL_ROT_LEFT)) { stopParticle(); llSetTimerEvent(0.00); } } changed(integer change) { if (change & CHANGED_COLOR) particle(); } listen(integer channel, string name, key id, string msg) { if(msg == "Red") { llSetColor(<1.0,0.0,0.0>,ALL_SIDES); } else if (msg == "Green") { llSetColor(<0.0,1.0,0.0>,ALL_SIDES); } else if (msg == "Blue") { llSetColor(<0.0,0.0,1.0>,ALL_SIDES); } else if (msg == "Yellow") { llSetColor(<1.0,1.0,0.0>,ALL_SIDES); } else if (msg == "Pink") { llSetColor(<0.9,0.14,0.9>,ALL_SIDES); } else if (msg == "Purple") { llSetColor(<0.7,0.0,1.0>,ALL_SIDES); } else if (msg == "White") { llSetColor(<1.0,1.0,1.0>,ALL_SIDES); } else if (msg == "Black") { llSetColor(<0.0,0.0,0.0>,ALL_SIDES); } else if (msg == "Grey") { llSetColor(<0.5,0.5,0.5>,ALL_SIDES); } particle(); } timer() { particleTriggered = 0; stopParticle(); } } I am really losing my mind on this one...
  3. Sorry i had no internet for a few days. So this is integer particleTriggered = 0; particle(vector NewColor){ llParticleSystem([ PSYS_PART_FLAGS,( 0 |PSYS_PART_INTERP_COLOR_MASK |PSYS_PART_INTERP_SCALE_MASK |PSYS_PART_WIND_MASK |PSYS_PART_EMISSIVE_MASK ), PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE , PSYS_PART_START_ALPHA,0.6, PSYS_PART_END_ALPHA,0, PSYS_PART_START_COLOR,NewColor , PSYS_PART_END_COLOR,NewColor , PSYS_PART_START_SCALE,<0.859,1.970,0>, PSYS_PART_END_SCALE,<0.777,1.780,0>, PSYS_PART_MAX_AGE,0.5, PSYS_SRC_MAX_AGE,0.0, PSYS_SRC_ACCEL,<0,0,0.0>, PSYS_SRC_BURST_PART_COUNT,1, PSYS_SRC_BURST_RADIUS,0, PSYS_SRC_BURST_RATE,0.05, PSYS_SRC_BURST_SPEED_MIN,0, PSYS_SRC_BURST_SPEED_MAX,0.0078125, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,3.125, PSYS_SRC_OMEGA,<0,0,0>, PSYS_SRC_TEXTURE, (key)"textureuuid", PSYS_SRC_TARGET_KEY, (key)"00000000-0000-0000-0000-000000000000" ]); } integer gON; integer gChan; integer gLisn; stopParticle() { llLinkParticleSystem(LINK_SET,[]); } default { state_entry() { gChan = (integer)("0xF" + llGetSubString(llGetOwner(),0,6))+11; gLisn = llListen(gChan,"","",""); gON = !gON; } run_time_permissions(integer perm) { if (perm) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); } } attach(key on) { if (on != NULL_KEY) { integer perm = llGetPermissions(); stopParticle(); gLisn = llListen(gChan,"","",""); if (perm != (PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION)) { llRequestPermissions(on, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); stopParticle(); gLisn = llListen(gChan,"","",""); } else { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); stopParticle(); gLisn = llListen(gChan,"","",""); } } else { stopParticle(); gLisn = llListen(gChan,"","","");; } } control(key owner, integer level, integer edge) { if (level & (CONTROL_FWD | CONTROL_BACK)) { particle(); llSetTimerEvent(0.5); } else if (edge & (CONTROL_RIGHT | CONTROL_ROT_RIGHT)) { particle(); llSetTimerEvent(0.00); } else if (edge & (CONTROL_LEFT | CONTROL_ROT_LEFT)) { stopParticle(); llSetTimerEvent(0.00); } } listen(integer channel, string name, key id, string msg) { vector color; if(msg == "Red") { color = <1.0,0.0,0.0>; } else if (msg == "Green") { color = <0.0,1.0,0.0>; } else if (msg == "Blue") { color = <0.0,0.0,1.0>; } else if (msg == "Yellow") { color = <1.0,1.0,0.0>; } else if (msg == "Pink") { color = <0.9,0.14,0.9>; } else if (msg == "Purple") { color = <0.7,0.0,1.0>; } else if (msg == "White") { color = <1.0,1.0,1.0>; } else if (msg == "Black") { color = <0.0,0.0,0.0>; } else if (msg == "Grey") { color = <0.5,0.5,0.5>; } particle(color); } timer() { particleTriggered = 0; stopParticle(); } } Sorry if thats a bit messy, i am still a noob So i also tried to use "particleTriggered = 1;" instead of "particle();" but it also doesnt work. Same for "gON = !gON;" And i am not sure about the gLisn, i pasted it on every if or else to make sure that it always accepts a color change. The working version without color changing option is this one: integer particleTriggered = 0; particle() { { { llParticleSystem([ PSYS_PART_FLAGS,( 0 |PSYS_PART_INTERP_COLOR_MASK |PSYS_PART_INTERP_SCALE_MASK |PSYS_PART_WIND_MASK |PSYS_PART_EMISSIVE_MASK ), PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE , PSYS_PART_START_ALPHA,0.6, PSYS_PART_END_ALPHA,0, PSYS_PART_START_COLOR,<1.0,0.2,0.2> , PSYS_PART_END_COLOR,<1,0.4,0.4> , PSYS_PART_START_SCALE,<0.960,2.2,0>, PSYS_PART_END_SCALE,<0.894,2.048,0>, PSYS_PART_MAX_AGE,0.5, PSYS_SRC_MAX_AGE,0.0, PSYS_SRC_ACCEL,<0,0,0.0>, PSYS_SRC_BURST_PART_COUNT,1, PSYS_SRC_BURST_RADIUS,0, PSYS_SRC_BURST_RATE,0.05, PSYS_SRC_BURST_SPEED_MIN,0, PSYS_SRC_BURST_SPEED_MAX,0.0078125, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,3.125, PSYS_SRC_OMEGA,<0,0,0>, PSYS_SRC_TEXTURE, (key)"textureuuid", PSYS_SRC_TARGET_KEY, (key)"00000000-0000-0000-0000-000000000000" ]); } } } stopParticle() { llLinkParticleSystem(LINK_SET,[]); } default { run_time_permissions(integer perm) { if (perm) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); } } attach(key on) { if (on != NULL_KEY) { integer perm = llGetPermissions(); stopParticle(); llListen(0,"", NULL_KEY,""); if (perm != (PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION)) { llRequestPermissions(on, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); stopParticle(); llListen(0,"", NULL_KEY,""); } else { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT, TRUE, TRUE); stopParticle(); llListen(0,"", NULL_KEY,""); } } else { stopParticle(); llListen(0,"", NULL_KEY,""); } } control(key owner, integer level, integer edge) { if (level & (CONTROL_FWD | CONTROL_BACK)) { particle(); llSetTimerEvent(0.5); } else if (edge & (CONTROL_RIGHT | CONTROL_ROT_RIGHT)) { stopParticle(); llSetTimerEvent(0.00); } else if (edge & (CONTROL_LEFT | CONTROL_ROT_LEFT)) { stopParticle(); llSetTimerEvent(0.00); } } timer() { particleTriggered = 0; stopParticle(); } }
  4. Oh alright thank you so much! I guess this way i can seperate each hud for multiple objects
  5. I forgot to mention it. I already tried particle(color); and just for fun particle(NewColor); and it says name not defined within scope
  6. Hello Rolig! So i made a script that triggers the particles when i walk, which works well. Now i am trying to control the color by a HUD but the Script gives me missmatch of type or number of arguments when i use this: control(key owner, integer level, integer edge) { if (level & (CONTROL_FWD | CONTROL_BACK)) { particle(); llSetTimerEvent(0.5); } i don't really understand why since the particle is mentioned in the beginning with particle(vector NewColor){ llParticleSystem([
  7. Thanks for explaining! So i could create the offset like this? (integer)("0xF" + llGetSubString( llGetOwner(), 0,6)+2)
  8. How do i create the offset? So when i have gChan = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); How should it look like then? And what are those 2 numbers in the end for? I mean the "...() ,0,6))"
  9. Okay so far it works. I just wonder if i could use more than one animation at the same time for example if i take newAnimation == "Hovering" and i want to combine the same action for hovering up and hovering down, how do i do that?
  10. Alright yes this is exactly what i needed! Thank you very much and have a nice day
  11. Also i found this: its a walker, that plays soundfiles related to the current status (walking standing turning left turning right and so on). I tried to get behind this but i have no idea how it adresses the soundfiles. I just assume that the script plays the soundfiles because they have the same name as the animations so the script basically thinks that it plays the anims. here it is: string Previous; integer IsRepeatable(string anim) { if(anim == "Standing") return FALSE; else if(anim == "Sitting") return FALSE; else if(anim == "Sitting on Ground") return FALSE; else if(anim == "Crouching") return FALSE; else if(anim == "Hovering") return FALSE; else if(anim == "Landing") return FALSE; else if(anim == "Standing Up") return FALSE; else return TRUE; } default { on_rez(integer start) { Previous = ""; // Make it say what you're doing when you equip, so people get the idea of what it does. } state_entry() { llSetTimerEvent(0.05); } timer() { string anim = llGetAnimation(llGetOwner()); if(anim != Previous && llGetTime() > 0.6 || (IsRepeatable(anim) && llGetTime() > 2.0)) { if(anim != "FlyingSlow" /* Screw this slot in particular */) { llResetTime(); llPlaySound(anim, 1); Previous = anim; } } } }
  12. Hello there! Is it possible to make something like an AO script, that sets the Alpha of a prim instead of overriding the animations? llGetAgentInfo doesnt help me in what i planned to do and looking at all those AO scripts i am pretty clueless how to link an event like standing, walking, crouch walking, groundsit and so on to llSetAlpha commands. llGetAgentInfo doesnt help me since AGENT_WALKING refers to walking, running and crouchwalking but i need to seperate those events! I am clueless 😛
  13. Hello! I am making a script, that bursts particles for a short amount of time and so far its working good. My problem is just, that it triggers the particle when i beginn to press LButton and when i release it, which means twice per full click. Can someone help me to avoid this? this is the control part: control(key owner,integer level, integer edge) { if (edge & (CONTROL_LBUTTON)) { particle(); llSetTimerEvent(0.5); } } timer() { particleTriggered = 0; stopParticle(); } I already tried, to work with integer level instead of edge and i can't make it look good like this
×
×
  • Create New...