heyitsrobert97
Member
Posts: 68
Threads: 29
Joined: Jan 2012
Reputation:
0
|
Enemy Hallucination not Working
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?
|
|
02-02-2012, 09:23 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Enemy Hallucination not Working
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 |
|
heyitsrobert97
Member
Posts: 68
Threads: 29
Joined: Jan 2012
Reputation:
0
|
RE: Enemy Hallucination not Working
(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
|
|
02-02-2012, 09:31 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Enemy Hallucination not Working
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
(This post was last modified: 02-02-2012, 09:34 AM by Tripication.)
|
|
02-02-2012, 09:33 AM |
|
heyitsrobert97
Member
Posts: 68
Threads: 29
Joined: Jan 2012
Reputation:
0
|
RE: Enemy Hallucination not Working
(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.
|
|
02-02-2012, 09:35 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Enemy Hallucination not Working
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 |
|
heyitsrobert97
Member
Posts: 68
Threads: 29
Joined: Jan 2012
Reputation:
0
|
RE: Enemy Hallucination not Working
(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 +Rep
|
|
02-02-2012, 09:37 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Enemy Hallucination not Working
um wut k?
|
|
02-02-2012, 09:38 AM |
|
heyitsrobert97
Member
Posts: 68
Threads: 29
Joined: Jan 2012
Reputation:
0
|
RE: Enemy Hallucination not Working
(02-02-2012, 09:38 AM)Tripication Wrote: um wut k?
its works thats why
|
|
02-02-2012, 09:41 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Enemy Hallucination not Working
oh...ok. Good luck with the rest of ur CS
|
|
02-02-2012, 09:41 AM |
|
|