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
Making an enemy chase you on level start?
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#1
Making an enemy chase you on level start?

I've encountered something that I can't seem to know here:
I want to know how can I make an enemy run on a full sprint to the player. To be more understandable, when I make an enemy with the editor, it just stands there. I want to make it run towards me on full speed (like the Chase scene in the Sewer level). But I just don't know how to do it.

Anyone can help?

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
01-04-2011, 12:36 PM
Website Find
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#2
RE: Making an enemy chase you on level start?

ShowEnemyPlayerPosition("GRUNT_NAME");

[Image: 2exldzm.png]
01-04-2011, 02:26 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#3
RE: Making an enemy chase you on level start?

Ok, where should I put it? I'm new and I may sound like a n00b. I just started working with this.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 01-04-2011, 02:31 PM by Robby.)
01-04-2011, 02:30 PM
Website Find
Som1Lse Offline
Member

Posts: 183
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: Making an enemy chase you on level start?

Then add it to the OnStart event.
If you don't have a OnStart event then read this.
01-04-2011, 03:22 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#5
RE: Making an enemy chase you on level start?

Now this made a big problem. I've added it, read in HPL2 Documentation for two hours. And I've set up what I needed to, but when I set up the development environment, (which means it will launch my map directly) the .hps file (script) is giving me an error.

My enemy is a servant grunt named "Junk" I've set it up so that when the map starts the grunt would start to run at me on full speed. But I keep getting an error which says it can't run the file itself and gives this error:
"main (12, 29) : ERR : "Junk" is not declared"

Now what does that mean?! (Removing the script line from void OnStart() makes the game launch the map with no problems.)

Now my script file consists only of the "ShowEnemyPlayerPosition" line, but it won't work with that line present. Any help?

EDIT: NVM. Fixed it. Some spaces have caused a problem and the game gave in. Now it works perfectly. I'm starting to do a small mod. But I barely have at least 1% knowledge in modding. But now I'm working on a mod known as "Floating Midway". You'll find out more about it on one of the threads in Showcase.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 01-04-2011, 06:50 PM by Robby.)
01-04-2011, 06:16 PM
Website Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#6
RE: Making an enemy chase you on level start?

(01-04-2011, 06:16 PM)Nemet Robert Wrote: "main (12, 29) : ERR : "Junk" is not declared"

It looks like you forgot to put Junk in quotes, it usually says that when it finds a string it doesn't know like Junk.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-04-2011, 06:41 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#7
RE: Making an enemy chase you on level start?

(01-04-2011, 06:41 PM)Frontcannon Wrote:
(01-04-2011, 06:16 PM)Nemet Robert Wrote: "main (12, 29) : ERR : "Junk" is not declared"

It looks like you forgot to put Junk in quotes, it usually says that when it finds a string it doesn't know like Junk.

I DID put the "Junk" into quotes. But never mind. Already fixed it. Some spaces in the } and { ruined everything. But now I'm working on a mod with the knowledge I gained.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
01-04-2011, 06:56 PM
Website Find




Users browsing this thread: 3 Guest(s)