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 "Is it possible to script X..." [Solved]
archaicrune Offline
Junior Member

Posts: 3
Threads: 1
Joined: Jul 2016
Reputation: 0
#1
"Is it possible to script X..." [Solved]

The first time I posted on the forums I was instantly banned. Let's hope that doesn't happen again, lol.

Sorry in advance, people must get tired of scripting questions. But I've been trying not to post on the forums unless I'm really stuck, and have been using the engine scripts page and also referencing from the game code and other custom story code to help me get an idea of how scripts work.

But anyway, I was wondering if it's possible to script this:

Getting a monster to run while it's following a patrol path? I'm trying to get the feel of being chased while there is no actual danger from a monster. I've tried putting in "run.dae_anim" in the string& asAnimation part of the patrol node code, but no luck.
(This post was last modified: 01-17-2017, 03:21 AM by archaicrune.)
07-13-2016, 07:52 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: "Is it possible to script X..." question

I'm sorry to hear about your past experience on here. I'm 99% sure it was by mistake.

It might be a bit advanced to answer your question, but here's my 2 cents:
Personally I've had issues with the animation argument for the node script. I don't think I've ever gotten it to work, but then again I haven't tried it much. But looking away from that, perhaps it would work better to create a custom monster entity for this scene.

Open the grunt entity in the model editor and edit some of the values, like for example the default walk speed, and replace the walk animation with the run animation. I haven't done this myself but I imagine it shouldn't be too difficult. Experiment with it and see if you can figure something out.

Remember to save it as a different entity from the original grunt, like for example servant_grunt_run.ent.

07-13-2016, 09:49 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#3
RE: "Is it possible to script X..." question

I've managed to do it in my own mod (The Fugitive 3 if you're interested). The string& asAnimation input defines what animation you want the enemy to perform once that node is reached, so setting what animation to play through scripting in this case isn't going to work.

You have to do as Mudbill mentioned here, set its walk animation and speeds to what the run animation has instead and save it as a new entity.

Derp.
07-13-2016, 10:36 PM
Find
archaicrune Offline
Junior Member

Posts: 3
Threads: 1
Joined: Jul 2016
Reputation: 0
#4
RE: "Is it possible to script X..." question

(07-13-2016, 09:49 PM)Mudbill Wrote: I'm sorry to hear about your past experience on here. I'm 99% sure it was by mistake.

It might be a bit advanced to answer your question, but here's my 2 cents:
Personally I've had issues with the animation argument for the node script. I don't think I've ever gotten it to work, but then again I haven't tried it much. But looking away from that, perhaps it would work better to create a custom monster entity for this scene.

Open the grunt entity in the model editor and edit some of the values, like for example the default walk speed, and replace the walk animation with the run animation. I haven't done this myself but I imagine it shouldn't be too difficult. Experiment with it and see if you can figure something out.

Remember to save it as a different entity from the original grunt, like for example servant_grunt_run.ent.

Thanks, I'll try that. It all sounds a bit inconvenient but at least I'll have the faster entity for future use. And yes, haha it was an error. Being banned from the forums effectively IP bans you and you cannot view any pages, so I ended up emailing one of the devs about it. They reactivated my account within the day, no harm done. Totally forgiven considering the amount of actual spam this forum gets for whatever reason.

Thanks everyone who replied, creating a new entity did end up working. It was a bit of a pain as I had to replace the entity in my script and map, not to mention copying and renaming the original grunt files. Was all worth it in the end though. I'm honestly glad that I have an entity that I can now change the entirety of animation/speed settings on; I didn't like some of the original amnesia speed settings.

I'm now marking the thread as solved, thanks again.
(This post was last modified: 07-14-2016, 12:57 AM by archaicrune.)
07-14-2016, 12:16 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: "Is it possible to script X..." question

Looks like I was the one who performed said action and likely classified you as spamming also with your post being amongst all the new users and new spam posts. Sorry if I made this whole experience a bit more difficult for you, but I hope you do stick around!

You'll be surprised about some of the constraints that you have to deal with in HPL2, but in a way, some of that is kinda fun to experiment with in terms of trying to get around said constraints. If you look at some of the limitations, you tend to get quite creative in the things that you can do. I'm sure some of the better mods that of been released look at the constraints, and attempt to work around them however possible.

Good luck on your mod!

Discord: Romulator#0001
[Image: 3f6f01a904.png]
07-14-2016, 01:02 AM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#6
RE: "Is it possible to script X..." [Solved]

(07-14-2016, 01:02 AM)Romulator Wrote: Looks like I was the one who performed said action and likely classified you as spamming also with your post being amongst all the new users and new spam posts. Sorry if I made this whole experience a bit more difficult for you, but I hope you do stick around!

You'll be surprised about some of the constraints that you have to deal with in HPL2, but in a way, some of that is kinda fun to experiment with in terms of trying to get around said constraints. If you look at some of the limitations, you tend to get quite creative in the things that you can do. I'm sure some of the better mods that of been released look at the constraints, and attempt to work around them however possible.

Good luck on your mod!

Example of totally hacking the engine:



07-14-2016, 01:25 AM
Find
Newsman Waterpaper Offline
Senior Member

Posts: 735
Threads: 20
Joined: May 2013
Reputation: 39
#7
RE: "Is it possible to script X..." [Solved]

Actually, it could work. The Manpig enemy type has a PatrolMoveSpeed setting which you choose if the enemy runs or walk in its patrol. But you would have to create a new entity file for the grunt and rename all of the animations to fit the manpig enemy type but I have created my own version of that for my own mod.

Here's the download for it.

Note: This doesn't have the danger,search or attack music and I don't know if it 100% works but it can be used as a template for what you are going for. Feel free to make your own changes to it! Just sure that the Pose is always "Biped"
07-14-2016, 03:49 AM
Find




Users browsing this thread: 1 Guest(s)