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
Script Help Enemy Hallucination not Working
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#1
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?

This Darn House! , Four Doors, Youtube
02-02-2012, 09:23 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
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.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
02-02-2012, 09:26 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#3
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

This Darn House! , Four Doors, Youtube
02-02-2012, 09:31 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#4
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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 02-02-2012, 09:34 AM by Tripication.)
02-02-2012, 09:33 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#5
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.


This Darn House! , Four Doors, Youtube
02-02-2012, 09:35 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
02-02-2012, 09:35 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#7
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 Big Grin +Rep

This Darn House! , Four Doors, Youtube
02-02-2012, 09:37 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#8
RE: Enemy Hallucination not Working

um wut k?

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
02-02-2012, 09:38 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#9
RE: Enemy Hallucination not Working

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

its works thats why

This Darn House! , Four Doors, Youtube
02-02-2012, 09:41 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#10
RE: Enemy Hallucination not Working

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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
02-02-2012, 09:41 AM
Find




Users browsing this thread: 1 Guest(s)