Frictional Games Forum (read-only)

Full Version: Enemy Hallucination not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey,
I copied the script to make the enemy as a hallucination but when in game it doesn't vanish it stays in its active state. Can Someone tell me whats wrong with the script?

{
AddEntityCollideCallback("Player", "roomonemonsterspawn", "SetEntityActive", true, 1);
}

void SetEntityActive(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("roomonegrunt", true);
SetEnemyIsHallucination("roomonegrunt", true);
PlaySoundAtEntity("", "scare_male_terrified.snt", "Player", 0, false);
}

but i also in the level editor set the enemy to hallucination and enddistance 1 but i want it to disappear when its right near you so what number do i put for that.
and in SetEnemyIsHallucination("roomonegrunt", true); what does the true do?
the true would mean that it is set to yes, it is a Hallucination.
The easiest way is just to have the set entity active and then click the monster in the map editor and tick the Is Hallucination box, and set the end distance to 1 or whatever. Remove the SetEnemyIsHallucination line and make sure you save your map and check the spelling in relation to the map and the script.
(02-02-2012, 09:26 AM)Tripication Wrote: [ -> ]the true would mean that it is set to yes, it is a Hallucination.
The easiest way is just to have the set entity active and then click the monster in the map editor and tick the Is Hallucination box, and set the end distance to 1 or whatever. Remove the SetEnemyIsHallucination line and make sure you save your map and check the spelling in relation to the map and the script.
I did That but when it spawned it hit me then vanished but i dont want that to happen
Oh, you dont want it to happen
then uncheck the box?

When its ahallucination, it just means it will vanish when its close
oh, you mean it actually hit you, ok well im not sure about that, you can change the distance by decimals, it doesn't have to be whole numbers
(02-02-2012, 09:33 AM)Tripication Wrote: [ -> ]Oh, you dont want it to happen
then uncheck the box?

When its ahallucination, it just means it will vanish when its close
wait?

I want it to spawn then run to me and when its near then vanish. I know the script for it to run so dw about that script.

in other words, there is not function that can stop/delay the attacks. You might be able to rig something up with SetEnemyDisableTriggers(string& asName, bool abX); but it would be too difficult to get right, just try 1.5 or 2.0
(02-02-2012, 09:35 AM)Tripication Wrote: [ -> ]in other words, there is not function that can stop/delay the attacks. You might be able to rig something up with SetEnemyDisableTriggers(string& asName, bool abX); but it would be too difficult to get right, just try 1.5 or 2.0
Thanks for your help Big Grin +Rep
um wut k?
(02-02-2012, 09:38 AM)Tripication Wrote: [ -> ]um wut k?

its works thats why
oh...ok. Good luck with the rest of ur CS
Pages: 1 2