Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Make entities disapear

Author
Message
edu
16
Years of Service
User Offline
Joined: 28th Aug 2008
Location:
Posted: 12th Jul 2009 14:40
Hello i was wondering is it possible to make entities disapear in fps creator ? For example if player sees from the window that there is enemy waiting inside the room but when you walk into the room there is nobody.
EGG HEAD OF DOOM
16
Years of Service
User Offline
Joined: 21st Sep 2008
Location: The Hacked Hospital Lobby
Posted: 12th Jul 2009 19:56
you could easily do that with a trigger zone and the destroy command
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 12th Jul 2009 22:27
Ahh, the old Half Life GMan...

Asher's right, the trigger and destroy's the way to go, just add :activated=1:destroy into the enemy's AI script...

If I was ever given the opportunity to remove all the bad from the world, I wouldn't, because for there to be heroism, compassion and all that is good, there must also be all that is bad.
Wiseberry12851
15
Years of Service
User Offline
Joined: 2nd Jun 2009
Location: Some Parallel Universe
Posted: 12th Jul 2009 23:30
Theres a much easier way to do that. It's possible to do a lot of things with trigger zones but frankly it can get confusing and difficult to work with if your applying to more than one group or other.

You really can just program it into the enemy without state commands as well to ensure it will always happen

:plrdistwithin=50:setalphafade=0
:plrdistfurther=51:setalphafade=100

Set Alpha Fade is referencing what you see not only the alpha layer thus making instantly invisible

Plr Dist Within and Further are measured in units, each block you see in the editor is 50 units so a value of 100 would mean player is within 2 blocks.

Now for your example of walking into the room, I don't reccomend the destroy command as I imagine you would want the invisible enemy to shoot back or give you a surprise

If you want the enemy to actually die and never return you could use destroy in either distance within or plrwithinzone but if you want to walk through a door and find that the room is actually empty only to find that somebody is firing at you that you cannot see then you would use something like below

:plrwithinzone=1:setalphafade=0
:plrwithinzone=0:setalphafade=100

Which would confuse the player as anytime he stepped into this invisible zone whether the entire room or portion's of it the enemy would ghostly vanish but still be firing and receiving damage from the player

But it's probably best to switch to activated as Plr Within Zone on an an enemy will mean he becomes invisible anywhere in the level when you enter a zone so a better version is below

:activated=1:setalphafade=0
:activated=0:setalphafade=100

and use the following triggerzone script which would make the enemy or group above invisible and visible, Use the If Used in the trigegrzone

:plrwithinzone=1:activateifused=1
:plrwithinzone=0:activateifused=0

I could go on forever but to wrap things up here are a few other things you could do that you might find fun

colon and coloff are action commands so using them means you can determine when the enemy will actually be able to walkthorugh other stuff and pass through the player

:plrdistwithin=50:colon
:plrdistfurther=51:coloff

The below script will set the enemy to be semi-invisible instead of completely
:plrwithinzone=1:setalphafade=50
:plrwithinzone=0:setalphafade=100

The below script will additionally set the enemy to appear ghost like assuming you take out all the color in the texture and apply it as the alt texture
:plrwithinzone=1:setalphafade=50,alttexture=1
:plrwithinzone=0:setalphafade=100,alttexture=0

---------------------------------------
Advanced Licensed Computer Programmer and Custom Programming Language Interfacing. Graphics / Video Designer.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 12th Jul 2009 23:42
After looking at your post, I think it's obvious that mine's easier...

If I was ever given the opportunity to remove all the bad from the world, I wouldn't, because for there to be heroism, compassion and all that is good, there must also be all that is bad.
Wiseberry12851
15
Years of Service
User Offline
Joined: 2nd Jun 2009
Location: Some Parallel Universe
Posted: 13th Jul 2009 02:21
I was giving several alternatives to the script rather than instantly dying, there's loads of option's, just around 1 or 2 lines. My post was long giving off alterantives not really meant to be a tutorial or used all at once, that would long and complicated

---------------------------------------
Advanced Licensed Computer Programmer and Custom Programming Language Interfacing. Graphics / Video Designer.

Login to post a reply

Server time is: 2025-05-25 13:22:51
Your offset time is: 2025-05-25 13:22:51