Iceblade10 Posted August 12, 2011 Share Posted August 12, 2011 I'm trying to make a HUD for a SL based game I'm making, the problem I came across is, how would I go about making different damage types for a object? I'm trying to make 3 objects, a reaper, flame, and bandages, each respectively doing 100, 10, and, -100 damage, although from the script I have atm, I'm wondering if using llCollision is really the way.integer energy; default { state_entry() { energy=100; llSetText((string)energy,<0,1,0>,1); } collision_start(integer x) { if(energy>0) { llCollisionFilter("pet",NULL_KEY,TRUE); llSetText((string)energy,<0,1,0>,1); energy = energy-10; llSleep(1.0); } else { llSetText("Game Over!",<1,1,0>,1); llSleep(4.0); llResetScript(); } } } Studying some game objects from other sims, they all have scripts in each pickupable item, so I'm assuming they each have a string in them triggering the removal/increase of health in the HUD via a message when they are touched, I'm racking my brain trying to figure out, how will I get that to work. so i have 2 possible methodsthe collision filter method (which might not be possible according to some posts Ive seen)and a object communicating with the HUD I rarely ever ask for help, but ths has been bugging me for the longest time now Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 13, 2011 Share Posted August 13, 2011 Why not just make each object a vendor? A person can't just take the object, but has to click on the vendor to get a copy. Rig it so that the act of clicking also sends a chat message with llRegionSayTo on a high negative private channel. The HUD receives the message and downgrades the person's health score. Link to comment Share on other sites More sharing options...
Poenald Palen Posted August 13, 2011 Share Posted August 13, 2011 Instead of collisions sometimes Volume Detect is used. I know this due to an extremely obvious use for my chosen past time in SL....you can walk right through it and it records you passed through..among a few other things. I can't remember the exact use and function name, but Volume Detect is maybe a good starting point. Of course, the wiki helps here...as usual! Link to comment Share on other sites More sharing options...
Freecilla Kuhn Posted August 13, 2011 Share Posted August 13, 2011 When a collision is made have the hit item say 'something' and the hud will listen for this 'something' and do what you script it to do upon hearing that 'something'. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now