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 grunt active and patrol on key pickup
craazyy1 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Mar 2012
Reputation: 0
#1
Making grunt active and patrol on key pickup

So I watched "ThisIsYourComputer"'s vid "Activate monster upon key pickup" on Youtube, and followed the instructions, but when I try to load up the map, this appears:
http://pastie.org/3574259
I'm guessing you'll need the script it's trying to run:

http://pastie.org/3574272


I just started learning this stuff, so I still don't know that much, sorry for any obvious mistakes...

Chocobos are awesome! KWEH!! ^-^
Sorry for stupid questions, I'm kind of new to scripting
(This post was last modified: 03-12-2012, 03:15 AM by craazyy1.)
03-12-2012, 01:26 AM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#2
RE: Making grunt active and patrol on key pickup

void OnStart()
{
  SetEntityPlayerInteractCallback("key_study_1", "ActivateMonster", true);
}
void ActivateMonster(string &in item)
{
  SetEntityActive("servant_grunt_1", true);
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", "0", "idle");
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", "0", "idle");
}


void OnEnter()
{
  
}

void OnLeave()
{
  
}
try this, your code wasn't anywhere. It didn't know whether to start when you leave a map, when you enter a map, or when it simply starts.

The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 03-12-2012, 01:29 AM by Strembitsky.)
03-12-2012, 01:28 AM
Find
craazyy1 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Mar 2012
Reputation: 0
#3
RE: Making grunt active and patrol on key pickup

Thanks for quick response, but still doesn't work. Sad
Same error, different lines,
6,3 and 7,3

Also, is there a way to run the client and not have it close everytime it fails to load. Think I saw something like that on the wiki, can't remember where.

Chocobos are awesome! KWEH!! ^-^
Sorry for stupid questions, I'm kind of new to scripting
(This post was last modified: 03-12-2012, 01:42 AM by craazyy1.)
03-12-2012, 01:33 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Making grunt active and patrol on key pickup

Strings aren't integers or floats.

Tutorials: From Noob to Pro
(This post was last modified: 03-12-2012, 01:55 AM by Your Computer.)
03-12-2012, 01:55 AM
Website Find
DaAinGame Offline
Member

Posts: 90
Threads: 11
Joined: Mar 2012
Reputation: 4
#5
RE: Making grunt active and patrol on key pickup

(03-12-2012, 01:55 AM)Your Computer Wrote: Strings aren't integers or floats.

Meaning it should be like this:

void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "ActivateMonster", true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");
}

Or- You had AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", "0", "idle");
Should be: AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");


Realm Of Another Chapter 1: http://www.frictionalgames.com/forum/thread-14142.html
Realm Of Another Chapter 2: Postponed
Adder Halls: 5%
(This post was last modified: 03-12-2012, 02:47 AM by DaAinGame.)
03-12-2012, 02:35 AM
Find
craazyy1 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Mar 2012
Reputation: 0
#6
RE: Making grunt active and patrol on key pickup

Not sure what you mean Your computer, but I got it to work.
http://pastie.org/3574683

Had some things in quotation marks that weren't supposed to be in quotation marks. What I hate about scripting is that a small error, can ruin everything...

Edit: Guy above kind of ninjad me...

Chocobos are awesome! KWEH!! ^-^
Sorry for stupid questions, I'm kind of new to scripting
(This post was last modified: 03-12-2012, 02:53 AM by craazyy1.)
03-12-2012, 02:51 AM
Find




Users browsing this thread: 1 Guest(s)