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 / Entities attack player

Author
Message
NarGalloth
14
Years of Service
User Offline
Joined: 28th Aug 2010
Location: Spain
Posted: 19th Sep 2010 03:40
Hello.
I need help making a script. What I need is: when an entity appears in a place (I have alreayd done this with a Trigger Zone), it goes directly to the player and attack it, even if the entity does not see the player. If the player runs, the entity must follow him and keep attacking it.
The entities are zombies and other creatures.
I have read a lot of posts in the forum, but I didn't found what I need. I hope you can help me.

Greetings
Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 19th Sep 2010 19:26 Edited at: 19th Sep 2010 19:27
:always:followplr
:plrdistwithin=60:Here you add the attack script

Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 19th Sep 2010 22:27
^That's true

-Why didn't God take gaga,justin bieber or kesha instead of Randy Rhoads, Cliff Burton or Dio?
NarGalloth
14
Years of Service
User Offline
Joined: 28th Aug 2010
Location: Spain
Posted: 20th Sep 2010 00:11
First of all, thanks for answering.
However, I have very little knowledge of scripts ...
What do you mean by attack script? I hope not to be annoying or capricious but ... Can you show me the full script?
Or at least explain me how to do it.

Thanks for your attention
NarGalloth
14
Years of Service
User Offline
Joined: 28th Aug 2010
Location: Spain
Posted: 30th Sep 2010 00:15
Why nobody answered me? I posted 10 days ago, and I need help with this...! Please...

The are always posibilities. The secret is to never give up.
Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 30th Sep 2010 17:29 Edited at: 30th Sep 2010 17:30
The attack script is the entity's shoot script assigned.

just add shootplr where it says here you add your attack script.

And assign a simple shoot script to the entity from the people folder.

NarGalloth
14
Years of Service
User Offline
Joined: 28th Aug 2010
Location: Spain
Posted: 9th Oct 2010 20:13
Hi, thanks for your answer.
I did what you said, but... There is ONE thing that isn't working.
There is a way to make the entity avoid walls and obstacles to reach the player. Because if I put the player in a room, and the entity in a hallway adjacent to it, it begins to run towards the wall. Is it possible to have the entity seeks the shortest path to the player and then do what I described in the first post?
Sorry if I become very demanding.

The are always posibilities. The secret is to never give up.

Login to post a reply

Server time is: 2024-11-24 20:03:01
Your offset time is: 2024-11-24 20:03:01