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 / wall that block's the player but not your enemy's

Author
Message
maikyy
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location: between my front and back door
Posted: 24th Sep 2008 15:51
the people who have played hl:2 now what i mean,
an barrier where only enemy's can go through, but not you
but i need a little help here's my script

but when enemy's walk against the wall they are first standing still and then suddenly getting launched foreward does somebody now how that is happening

sorry for my bad english (i am dutch)
GP PrOdUcTiOnS
17
Years of Service
User Offline
Joined: 27th Jul 2007
Location: WWW.
Posted: 25th Sep 2008 02:17
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Sep 2008 07:04
Try reversing your states so that when the game starts, it'll set "coloff" in state 0 and then wait in state 1 for the player to get close.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Sep 2008 09:44 Edited at: 26th Sep 2008 10:33
I've been testing this and I can't seem to get it to work satisfactorily.

Addendum:

First of all the code is not correct. The first line is:

:state=0, plrdistwithin=25, colon:state=1

It should be:

:state=0,plrdistwithin=25:colon,state=1

Same thing goes for the second line. The second thing is that, as Ply stated you needed to reverse the states. However, there is still one more issue and that is using the distance of 25 units. Being further than 25 units is no problem but 25 units is too close and I found the player still runs right through it. Even 30 can be too close. I had more success with 40 units. You can play around with it.

I also found that it was not always consistent. Sometimes the player gets blocked and then other times the player seems to be able to sneak through the wall. One way to prevent this from happening is to turn "Always Active" on. It is found under physics. Just indicate "yes" to turn it on.

When a person codes, you will find that there can be more than one way to do it. For example you can put the following in the "start" AI.



You can then leave the original states as they were because when the level starts collision will be off.

Just some things to think about.

BTW, I seem to remember that you cannot have spaces within your line of code. In the code you have presented you have spaces after the commas. This is a common mistake. When I first started I did the same thing.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
maikyy
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location: between my front and back door
Posted: 4th Oct 2008 14:20
ok thanks for the feedback
and i think it started out well for my first script ever
even when it had just two lines

sorry for my bad english (i am dutch)

Login to post a reply

Server time is: 2024-11-24 13:51:41
Your offset time is: 2024-11-24 13:51:41