Jump to content

Game object problems


Iceblade10
 Share

You are about to reply to a thread that has been inactive for 4639 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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 methods

the 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

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

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

You are about to reply to a thread that has been inactive for 4639 days.

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
 Share

×
×
  • Create New...