Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Throw an exploding object?
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#18
RE: Throw an exploding object?

I searched for afDamage, is this the part of the script, you're talking about?

Spoiler below!
bool explosions_AddExplosiveItem(string &in asItemName, string &in asFile, float afRadius, float afForce, float afDamage)
{
//Create a string list for tracking this item
if(!stringListCreate(asItemName))
{
//Item has allready been added. Error & do nothing.
AddDebugMessage("Error - Item already added as Explosive Item: " + asItemName, false);
return false;
}
//Setup the break callback
SetEntityCallbackFunc(asItemName,"explosions_CallbackOnBreak");
//Create a radius object & setup the collide callback
string radiusName = asItemName + EXPRADIUS;
AddAttachedPropToProp(asItemName,radiusName,asFile,0,0,0,0,0,0);
AddEntityCollideCallback("item_*",radiusName,"explosions_RadiusCollideCallback",false,0);
//Setup the explosion settings
SetLocalVarFloat("FORCE_" + asItemName,afForce);
SetLocalVarFloat("DAMAGE_" + asItemName,afDamage);
SetLocalVarFloat("RADIUS_" + asItemName,1.0f);
SetLocalVarInt("MININDEX_" + asItemName,-1);
SetLocalVarFloat("STEPSIZE_" + asItemName,-1.0f);
for(float fbound = MINPRECISION; fbound < afRadius * 4; fbound *= 2)
{
if(fbound >= afRadius)
{
SetLocalVarFloat("RADIUS_" + asItemName,fbound);
return true;
}
}
AddDebugMessage("Warning - Couldn't bound radius: " + afRadius,false);
return false;
}


I'm not sure exactly what in the code to edit, but I evidently need to deal 100 damage to destroy the door (and the boards blocking it). If I don't do this, though, the script area is working pretty nicely. It just also goes off when you carry the rock up to the door, too.

EDIT: Also, not entirely sure why, but I had this issue in another thread, too. I put in the new grenade you provided and am still getting a bottle in-game. someone suggested I delete my map_cache, but I don't have any.

(This post was last modified: 03-19-2012, 01:15 AM by Damascus.)
03-19-2012, 01:09 AM
Find


Messages In This Thread
Throw an exploding object? - by Damascus - 03-17-2012, 08:56 PM
RE: Throw an exploding object? - by SilentStriker - 03-17-2012, 09:21 PM
RE: Throw an exploding object? - by ClayPigeon - 03-17-2012, 09:22 PM
RE: Throw an exploding object? - by Damascus - 03-17-2012, 09:36 PM
RE: Throw an exploding object? - by ClayPigeon - 03-17-2012, 09:39 PM
RE: Throw an exploding object? - by Damascus - 03-17-2012, 10:05 PM
RE: Throw an exploding object? - by SilentStriker - 03-17-2012, 11:14 PM
RE: Throw an exploding object? - by Stepper321 - 03-17-2012, 11:13 PM
RE: Throw an exploding object? - by Apjjm - 03-18-2012, 12:51 AM
RE: Throw an exploding object? - by Damascus - 03-18-2012, 06:31 AM
RE: Throw an exploding object? - by Apjjm - 03-18-2012, 11:47 AM
RE: Throw an exploding object? - by Equil - 03-18-2012, 07:19 AM
RE: Throw an exploding object? - by Acies - 03-18-2012, 07:07 PM
RE: Throw an exploding object? - by Damascus - 03-18-2012, 07:14 PM
RE: Throw an exploding object? - by Apjjm - 03-18-2012, 09:50 PM
RE: Throw an exploding object? - by Damascus - 03-18-2012, 10:29 PM
RE: Throw an exploding object? - by Apjjm - 03-19-2012, 12:35 AM
RE: Throw an exploding object? - by Damascus - 03-19-2012, 01:09 AM
RE: Throw an exploding object? - by Apjjm - 03-19-2012, 01:38 AM
RE: Throw an exploding object? - by Damascus - 03-19-2012, 01:42 AM
RE: Throw an exploding object? - by Apjjm - 03-19-2012, 01:43 AM
RE: Throw an exploding object? - by Damascus - 03-19-2012, 01:59 AM
RE: Throw an exploding object? - by Apjjm - 03-19-2012, 02:07 AM
RE: Throw an exploding object? - by Damascus - 03-19-2012, 02:15 AM
RE: Throw an exploding object? - by Apjjm - 03-19-2012, 02:18 AM



Users browsing this thread: 1 Guest(s)