3269 facesWTF???? X( I have 4 GB of RAM and a Swap File of 30 GB!!! the hlrad.exe program stps before reaching 1890 MB of use!!... What´s going wrong then with the compiler??? Any one have had this problem ever?
Create Patches : 53080 base patches
0 opaque faces
767292 square feet [110490080.00 square inches]
1 direct lights
BuildFacelights:
(44.92 seconds)
BuildVisLeafs:
(1826.68 seconds)
visibility matrix : 294.5 megs
MakeScales:
Error: Memory allocation failure
Description: The program failled to allocate a block of memory.
Howto Fix: Likely causes are (in order of likeliness) : the partition holding the swapfile iock of memory.
Howto Fix: Likely causs full; swapfile size is smaller than required; memory fragmentation; heap corruption
--- END hlrad ---
int CTrolley :: GiveAmmo( int iCount, char *szName, int iMax );I declare the function...
GiveAmmo(600, "9mm",600);// A ver si chuta..Put in into the ATTACK function...
int CTrolley :: GiveAmmo( int iCount, char *szName, int iMax )And this is the function that makes the monster give you AMMO instead damage. I think you can make it also heals you, but I don´t know how (yet)
{
CBaseEntity *pPlayer;
pPlayer = UTIL_FindEntityByClassname( NULL, "player" );
pPlayer->GiveAmmo(600,"9mm",600);
return TRUE;
}
sequence "attack1" "attack1" fps 15 ACT_MELEE_ATTACK1 5 { event 1 10 } { event 2 19 }What does those numbers mean, the first and the second, between the brackets?. :/
$sequence "attack2" "attack2" fps 15 ACT_MELEE_ATTACK1 1 { event 3 6 }
can you place the "ammo" model in game with a cycler entity?In a first approach I thought that, but the game NEEDS the ammobox be spawned the way I want.
perhaps the model is crashing the engine?No, the model in game perform all actions perfectly, and the game doesen´t crash like in the first attempt when I used pPlayer->GiveAmmo
Else, what if you take the existing dropitem code and use that instead?If you take a look it´s identical. The only part that I deleted is that of the code checking if the monster has a gun. Oh, and the Gibs part that makes the monster explode once it attacks the player.
Get your monster drop the W_357 then swap out your ammo once that works.Mmmm, I didn´t try that. So you think that the problem is that the code doesen´t regognize my model, right?
I would think that if the copy-pasted code doesn't work, then your're missing a step somewhere.I also think that, but...what step? That´s the question.
Also, does the "dropItem" function require the owner to posses said item? Or does it just spawn a new instance.I don´t know for sure. I must take a look to the code. Give a try and I´ll tell you.
Vector vecGunPos;
Vector vecGunAngles;
CBaseEntity *pGun;
GetAttachment( 0, vecGunPos, vecGunAngles );
{
pGun = DropItem( "ammo", vecGunPos, vecGunAngles );
}
if ( pGun )
{
pGun->pev->velocity = Vector (RANDOM_FLOAT(-100,100), RANDOM_FLOAT(-100,100), RANDOM_FLOAT(200,300));
pGun->pev->avelocity = Vector ( 0, RANDOM_FLOAT( 200, 400 ), 0 );
}
}[/blue][/quote]switch( pEvent->event )
{
case TROLL_AE_ATTACK_RIGHT:
{
//ALERT( at_console, "Drone slashes with right claw!!\n" );
CBaseEntity *pHurt = CheckTraceHullAttack( 0, gSkillData.zombieDmgOneSlash, DMG_SLASH );
if ( pHurt )
{
EMIT_SOUND_DYN ( ENT(pev), CHAN_WEAPON, pAttackHitSounds[ RANDOM_LONG(0,ARRAYSIZE(pAttackHitSounds)-1) ], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG(-5,5) );
}
else // Play a random attack miss sound
EMIT_SOUND_DYN ( ENT(pev), CHAN_WEAPON, pAttackMissSounds[ RANDOM_LONG(0,ARRAYSIZE(pAttackMissSounds)-1) ], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG(-5,5) );
if (RANDOM_LONG(0,1))
AttackSounds();
pev->nextthink = gpGlobals->time + 10;//¿chuta? Esto es para que tras atacar no vuelva a recargar en diez segunos ¡¡¡¡¡¡¡SIIIIII!!!!! ¡¡¡¡¡¡Chutaaaarrrrrrl el 7-7-2015 San-fer-mín!!!!!
GiveAmmo();// A ver si chuta....
}
break;
default:
CBaseMonster::HandleAnimEvent( pEvent );
break;
}
}[/blue][/quote]Right. How did that fix your problem?Sorry, I was talking about the edit button