Frictional Games Forum (read-only)
[SCRIPT] Enemy Hallucination not Working - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Enemy Hallucination not Working (/thread-13036.html)

Pages: 1 2


Enemy Hallucination not Working - heyitsrobert97 - 02-02-2012

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?


RE: Enemy Hallucination not Working - Tripication - 02-02-2012

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.


RE: Enemy Hallucination not Working - heyitsrobert97 - 02-02-2012

(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



RE: Enemy Hallucination not Working - Tripication - 02-02-2012

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


RE: Enemy Hallucination not Working - heyitsrobert97 - 02-02-2012

(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.




RE: Enemy Hallucination not Working - Tripication - 02-02-2012

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


RE: Enemy Hallucination not Working - heyitsrobert97 - 02-02-2012

(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


RE: Enemy Hallucination not Working - Tripication - 02-02-2012

um wut k?


RE: Enemy Hallucination not Working - heyitsrobert97 - 02-02-2012

(02-02-2012, 09:38 AM)Tripication Wrote: um wut k?

its works thats why


RE: Enemy Hallucination not Working - Tripication - 02-02-2012

oh...ok. Good luck with the rest of ur CS