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
Please help me :(
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#11
RE: Please help me :(

(06-12-2012, 06:20 PM)pdkgaming Wrote:
(06-12-2012, 06:19 PM)Datguy5 Wrote:
(06-12-2012, 06:18 PM)pdkgaming Wrote:
(06-12-2012, 06:15 PM)Datguy5 Wrote: You seem to have Setenemy to hallucination in between the collidecallbacks.Try moving it?
It doesn't matter where you put the function right? as long as they trigger an event.. right? And even so.. where should I move it to?

You dont actually even need that.You can go to the level editor and click the enemy and then click the hallucination button in the other tab.
Oh, lol.. I didn't know that xD Thanks! Smile
Np Big Grin

06-12-2012, 06:22 PM
Find
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#12
RE: Please help me :(

(06-12-2012, 06:22 PM)Datguy5 Wrote:
(06-12-2012, 06:20 PM)pdkgaming Wrote:
(06-12-2012, 06:19 PM)Datguy5 Wrote:
(06-12-2012, 06:18 PM)pdkgaming Wrote:
(06-12-2012, 06:15 PM)Datguy5 Wrote: You seem to have Setenemy to hallucination in between the collidecallbacks.Try moving it?
It doesn't matter where you put the function right? as long as they trigger an event.. right? And even so.. where should I move it to?

You dont actually even need that.You can go to the level editor and click the enemy and then click the hallucination button in the other tab.
Oh, lol.. I didn't know that xD Thanks! Smile
Np Big Grin
oh... still doesn't work though xD

Do you know what I did wrong at the monster part?


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LookTimer", true, 1);
}

void playsound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("break_wood1.ogg", false, 1, 0, 1.0, false);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("unlock_door.snt", "unlock_door", "mansion_2", 0.0f, false);
RemoveItem("studykey_1");
}

void EnemyAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}

void EnemyDisable(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", false);
}

EDIT: Nevermind :p for some reason, "servant_grunt_1" changed to "servant_grunt_2" in de level editor

But the first problem still exists :p

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
(This post was last modified: 06-12-2012, 06:40 PM by pdkgaming.)
06-12-2012, 06:26 PM
Website Find
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#13
RE: Please help me :(

Anyone? Sad

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
06-12-2012, 08:11 PM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#14
RE: Please help me :(

(06-12-2012, 08:11 PM)pdkgaming Wrote: Anyone? Sad
I have been staring at the provided script in notepad++ for the past 10-15 minutes and I really just can't find anything wrong. My only thought is that it must be wrong in the level editor, please double check the script area name as well as the name of the grunt.

I rate it 3 memes.
06-12-2012, 10:50 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#15
RE: Please help me :(

(06-12-2012, 06:26 PM)pdkgaming Wrote: But the first problem still exists :p

What's that? Not looking at Compound_5? If so, compounds don't exist outside of the level editor.

Tutorials: From Noob to Pro
06-12-2012, 11:00 PM
Website Find
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#16
RE: Please help me :(

(06-12-2012, 11:00 PM)Your Computer Wrote:
(06-12-2012, 06:26 PM)pdkgaming Wrote: But the first problem still exists :p

What's that? Not looking at Compound_5? If so, compounds don't exist outside of the level editor.
so i need to undo the compound and select one entity? okay thanks, i'll try it when i get home Smile

EDIT: okay, undoing the compound works... but now the player only looks at "corpse_male_torso_1" and keeps staring at it... changed nothing else on the script except for the maximum speed on StartPlayerLookAt to 100.. Anyone? :p

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
(This post was last modified: 06-13-2012, 08:33 PM by pdkgaming.)
06-13-2012, 01:02 PM
Website Find
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#17
RE: Please help me :(

Sorry for another long post but... here is my script again (edited the monster part out for better understanding... so dont mind some callbacks on void OnStart().. only the last one is the problem)


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_2", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LookTimer", true, 1); // <-- This one!
}

// makes sure the player looks at corpse_male_torso_1
void LookTimer(string &in asParent, string &in asChild, int alState)
{
AddTimer("LookAtEntity_1", 0, "LookAt_1");
}

// makes sure the player looks at chest_of_drawers_nice_broken_1
void Timer_1(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("LookAtEntity_2", 1, "LookAt_2");
}

// makes sure the player looks at painting03_1
void Timer_2(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("LookAtEntity_3", 1, "LookAt_3");
}

//LookTimer
void LookAt_1(string &in asTimer)
{
StartPlayerLookAt("corpse_male_torso_1", 100, 100, "Timer_1");
}

// Timer_1
void LookAt_2(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("chest_of_drawers_nice_broken_1", 100, 100, "Timer_2");
}

// Timer_2
void LookAt_3(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("painting03_1", 100, 100, "Timer_3");
}

void OnLeave()
{

}

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
06-13-2012, 09:00 PM
Website Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#18
RE: Please help me :(

I'm not sure if timers work well with what happens when Player looks at entity.

06-13-2012, 09:31 PM
Find
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#19
RE: Please help me :(

(06-13-2012, 09:31 PM)GrAVit Wrote: I'm not sure if timers work well with what happens when Player looks at entity.
owh.. but how can I make my player to look at 3 entities with 1 second between them? (or more seconds..)

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
06-13-2012, 09:33 PM
Website Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#20
RE: Please help me :(

(06-13-2012, 09:33 PM)pdkgaming Wrote:
(06-13-2012, 09:31 PM)GrAVit Wrote: I'm not sure if timers work well with what happens when Player looks at entity.
owh.. but how can I make my player to look at 3 entities with 1 second between them? (or more seconds..)
Yes.

06-13-2012, 09:46 PM
Find




Users browsing this thread: 1 Guest(s)