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
Can I ask you something(code)
888t Offline
Junior Member

Posts: 4
Threads: 2
Joined: Mar 2013
Reputation: 0
#1
Can I ask you something(code)

I don't know why it doesn work properly!

AddEntityCollideCallback("Player", "messageline", "startmessage", true, 1)
--
void startmessage(string &in asParent, string &in asChild, int alState) {
StartPlayerLookAt("agrippa", 1, 1, "");
SetPlayerActive(false);
SetMessage("Messages", "m1", 0);
AddTimer("timer1", 2.3f, "");
SetMessage("Messages", "m2", 0);
AddTimer("timer2", 2.3f, "");
SetMessage("Messages", "m3", 0);
AddTimer("timer3", 2.3f, "");
SetMessage("Messages", "m4", 0);
GiveItemFromFile("key_study", "key_study_ent");
SetEntityActive("brute2", true);
StopPlayerLookAt();
SetPlayerActive(true);
AddEnemyPatrolNode("brute2", "breakthrough", 0, "");
SetMessage("Messages", "m5", 0);
AddTimer("timer4", 2.0f, "");
SetMessage("Messages", "m6", 0);
}

is there any other way that show messages better than above??

when collide It only show the last message(m6) and doesn't look at agrippa .
(This post was last modified: 03-24-2013, 01:08 PM by 888t.)
03-24-2013, 01:06 PM
Find
Hardarm Offline
Posting Freak

Posts: 891
Threads: 39
Joined: Apr 2011
Reputation: 43
#2
RE: Can I ask you something(code)

To make the messages appear time after time you have to make multiple functions that start with one script, and each script should make start the next function subsequently.

Of course they don't work and only the last one works, because you are calling different scripts at the same time! The last message calls because the time is different than the others.

Also, are you sure the agrippa entity the player must look at is really called "agrippa" ? Check if it's called "agrippa_1", doublecheck names before claiming a script doesn't work Wink

As I said before, make a message with a timer start with a function. and in THAT other function you make ANOTHER time start.

listen to boards of canada
03-24-2013, 01:19 PM
Website Find
888t Offline
Junior Member

Posts: 4
Threads: 2
Joined: Mar 2013
Reputation: 0
#3
RE: Can I ask you something(code)

(03-24-2013, 01:19 PM)Hardarm Wrote: To make the messages appear time after time you have to make multiple functions that start with one script, and each script should make start the next function subsequently.

Of course they don't work and only the last one works, because you are calling different scripts at the same time! The last message calls because the time is different than the others.

Also, are you sure the agrippa entity the player must look at is really called "agrippa" ? Check if it's called "agrippa_1", doublecheck names before claiming a script doesn't work Wink

As I said before, make a message with a timer start with a function. and in THAT other function you make ANOTHER time start.

Thank you! I got it and solved it! Big Grin
03-24-2013, 04:42 PM
Find




Users browsing this thread: 1 Guest(s)