Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 3 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My problems
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(10-26-2012, 01:00 PM)The chaser Wrote:
(10-26-2012, 11:34 AM)naseem142 Wrote: Is this is how to add mementos?

.hps file:


void OnStart()
{
AddEntityCollideCallback("Player", "Quest1", "Quest_func_1", true, 1);
}


void Quest_func_1(string &in asItem, string &in asEntity)
{
AddQuest("Quest1" , "Quest_1");
}

extra_lang file:




The memento text in here
Wrong syntax:


void OnStart()
{
AddEntityCollideCallback("Player", "Quest1", "Quest_func_1", true, 1);
}


void Quest_func_1(string &in asParent, string &in asChild, int alState)
{
AddQuest("Quest1" , "Quest_1");
}

Plus:


The memento text in here
A NOTE
This is a note. If you can see the text in it, it means the .lang file is working.

Thank you , also i used the fade in and fade out function but i get an error at the lines where the fade out and in script are placed.


void ScriptArea_1_dram(string &in asChild, string &in asParent, int alState)
{
GiveSanityDamage(80.0f, true);
PlaySoundAtEntity("", "insanity_monster_roar01.snt", "Player", 0.0f, true);
FadeOut("3");
AddTimer("", 2, "dra_fade_1");
}

void dra_fade_1(string &in asTimer)
{
FadeIn("2");
}


EDIT: Oh and the memento still didn't work

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-27-2012, 10:43 AM by naseem142.)
10-27-2012, 10:42 AM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
RE: My problems

You can't declare numerical arguments (i.e. integer/float). Try removing the quotation marks from around the bolded numbers.

I rate it 3 memes.
10-27-2012, 10:46 AM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(10-27-2012, 10:46 AM)andyrockin123 Wrote: You can't declare numerical arguments (i.e. integer/float). Try removing the quotation marks from around the bolded numbers.
Okay thank you

I help people when i'm bored :U


Typing Speed: 74 Words per minute
10-27-2012, 11:43 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

I know how to make a player stare at a certain point.
But is it possible to make the player keep staring at the monster while its moving for a few seconds?

EDIT: Nvm , found what i need on the wiki.

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-28-2012, 08:56 AM by naseem142.)
10-28-2012, 08:00 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

Everything is working fine with the script , but there is one problem.
The player only looks at the place where the grunt spawned and doesn't look at it the whole time.

Here's my script:


void ScriptArea_1_dram(string &in asChild, string &in asParent, int alState)
{
GiveSanityDamage(99.0f, true);
PlaySoundAtEntity("", "insanity_monster_roar01.snt", "Player", 0.0f, true);
FadeOut(3);
AddTimer("", 2, "dra_fade_1");
SetEntityActive("servant_grunt_2", true);
StartPlayerLookAt("servant_grunt_2", 2, 2, "");
}

void ScriptArea_2_grunt(string &in asChild, string &in asParent, int alState)
{
SetEntityActive("servant_grunt_2", false);
StopPlayerLookAt();
}

( The grunt is scripted to walk to a certain point and there he collides with a script area , which activates ScriptArea_2_grunt. )

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-28-2012, 09:06 AM by naseem142.)
10-28-2012, 09:04 AM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
RE: My problems

You'll need to constantly call a timer that triggers the "Look" script. If the timer recalls itself every 0.25 seconds, it may be enough.

Otherwise, try coming up with a different situation.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-28-2012, 09:09 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(10-28-2012, 09:09 AM)Nemet Robert Wrote: You'll need to constantly call a timer that triggers the "Look" script. If the timer recalls itself every 0.25 seconds, it may be enough.

Otherwise, try coming up with a different situation.
The timer is the best choice :/
I'll use it

I help people when i'm bored :U


Typing Speed: 74 Words per minute
10-28-2012, 09:49 AM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
RE: My problems

Remain removing the timer when you don't want it to look.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-28-2012, 11:10 AM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

Another problem;

I have a male body corpse which i want it to jump a little bit up when the player takes the oil bottle placed near him.


void Pickup1(string &in asEntity, string &in type)
{
AddBodyForce("corpse_male_8", 0.0f , 50.5f, 0.0f , "world");
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0.0f, true);
}

There are no errors at all and the sanity damage and the sound work perfectly , but the body is not even moving a little.

I help people when i'm bored :U


Typing Speed: 74 Words per minute
10-29-2012, 11:26 AM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
RE: My problems

You'll need a lot of prop force, use this function and place the value anywhere from the hundreds to the thousands:

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);


You have to experiment a lot with prop force; it can vary greatly from one object to the next.

I rate it 3 memes.
10-29-2012, 11:29 AM
Find




Users browsing this thread: 1 Guest(s)