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
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#4
RE: Script Help

(07-12-2011, 07:26 PM)GreyFox Wrote: Yes that seems like a better idea. and yes when I open the door the enemy is behind the door. (I can show picture if you'd like) also I would like it following waypoints (so it doesn't get stuck, that used to happen in other levels before I did any scripting and just messed around).

1 More thing how did you make your script/example script in that code box?

And just so I understand better.

SetEntityPlayerInteractCallback("door", "MonsterActivate", true);
"door" Should be the Name of The Door I want Correct?
"MonsterActivate" Is the name of the script area in the Editor?
"true" What does the true part mean?

Waypoints? Just set some pathnodes on the ground and the enemy will automatically follow them. (So I've heard) set them on the ground right ooutside the door, when you try to open it (I'm assuming it's locked) He'll break down the door while you run away, if he doesn't spot you, he'll just follow the pathnodes.

to put it in a box, click on the icon that looks like a "#" then you paste your code, then go up to where it says [close tags] click it, and then there ya go.

Yes, "door" is the name of what you named the door. like "mansion_8", or whatever you name, etc.
No, This function isn't a collide function so there would be no area to run into. The "area" would actually be you trying to open the door.
"MonsterActivate" is the callback function, like I said earlier, whatever you want to happen when you interact with that door goes in between the brackets of "void MonsterActivate" or whatever you decide to name the callback function.
as for the meanings:

void SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

Calls a function when the player interacts with a certain entity.
Callback syntax: void MyFunc(string &in entity)

asName - internal name
asCallback - function to call
abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity


All of the info on what each command and what it means can be found on that page link I added "This will help you"

Oh, here's a heads up:
"bool" (or boolean) just means either "true" or "false"
"int" (or integer) is exaclty what it says, an integer or "whole number" (-1, 0, 5, etc.)
"float" (float) is a decimal number (1.0, 0.5, 0.25, etc.)
(This post was last modified: 07-12-2011, 08:43 PM by Zypherzemus.)
07-12-2011, 08:38 PM
Find


Messages In This Thread
Script Help - by GreyFox - 07-12-2011, 05:13 PM
RE: Script Help - by Zypherzemus - 07-12-2011, 07:17 PM
RE: Script Help - by GreyFox - 07-12-2011, 07:26 PM
RE: Script Help - by Zypherzemus - 07-12-2011, 08:38 PM
RE: Script Help - by GreyFox - 07-12-2011, 09:02 PM
RE: Script Help - by Kyle - 07-12-2011, 09:05 PM
RE: Script Help - by GreyFox - 07-13-2011, 07:05 PM
RE: Script Help - by Zypherzemus - 07-13-2011, 08:02 PM
RE: Script Help - by GreyFox - 07-13-2011, 08:13 PM
RE: Script Help - by ferryadams11 - 07-13-2011, 08:24 PM
RE: Script Help - by GreyFox - 07-13-2011, 09:16 PM



Users browsing this thread: 1 Guest(s)