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 and Quest help
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#1
Script and Quest help

Hello,if you don't know i'm making a map (The Darkness,coming very very soon) and i need some help on some scripts and quest...

First,the scripts :
-I don't know how to made a script that blow all the selected torches,play wind effect & sound,close a door at the same time and make lantern oil-less/inactive...if someone could help

And the quest/Memento :
-I want to add memento but i can't,i checked the .lang of the game and found it was :
<Entry Name="Quest_NAMEOFMEMENTO_Text>DESCRIPTION OF MEMENTO</Entry>
I did this in my custom .lang file and it crashes when selecting the custom story...i don't know what to do T_T
And if i'm right the code for addquest is :
AddQuest ("NAMEOFMEMENTO";"NAMEOFMEMENTO");

Please help me :/
09-17-2010, 07:40 PM
Website Find
Liag Offline
Junior Member

Posts: 8
Threads: 0
Joined: Sep 2010
Reputation: 1
#2
RE: Script and Quest help

//Use AddEntityCollideCallBack() in OnStart() to call this when player enters area
void NameOfArea(string &in asParent, string &in asChild, int alState)
{   //Plays the wind sound in the area
    PlaySoundAtEntity("windwhirl", "general_wind_whirl.snt", "NameOfArea", 0.0f, false);
     //Creates the wind effect in the area
    CreateParticleSystemAtEntity("pswhirl", "ps_dust_whirl.ps", "NameOfArea", false);
    
    SetSwingDoorClosed("name_of_door", true, true); //Closes the door
    
    for(int i = first_torch_number; i <= last_torch_number; i++)
        SetLampLit("name_of_torches_" + i, false, true); //Blows out the torches
        
    SetLanternActive(false, false); //Deactivates the lantern
}

This example is very simple and you should add timers and reaction sounds to make it more realistic.

Also, you're using a semicolon instead of a comma in your AddQuest call (which would generate the error), unless you just got it wrong here.
09-17-2010, 09:59 PM
Find
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#3
RE: Script and Quest help

FORGOT THIS (LOOK THE EDIT) Thank you for this script and for answering but there is a little problem,i've done everything but still get an error :
FATAL ERROR: Could not load script file
"custom_stories/TheDarkness/maps/ch00/ch00.hps'!
main (27,1) : ERR : Expected ';'

Look like there is a place where a ';' is missing but where Confused

Edit : Oh it's repaired,i accidently messed up with a script,i'm testing

Edit 2 : The script don't start :/

Edit 3: For the Quest,i don't have to add AddQuest in the .hps to make it crash
Just write the memento dialog in .lang file make it crash...

Edit 4 : Corrected,work perfectly well,thank you,now if i find how to make memento the map will be out tomorrow i think
09-17-2010, 10:31 PM
Website Find
iTIMMEH Offline
Junior Member

Posts: 40
Threads: 2
Joined: Sep 2010
Reputation: 0
#4
RE: Script and Quest help

I'm looking at your last post and I'm not sure what your problem is, are you still having trouble making a memento entry?


*edit*

Well I decided to look at implementing mementos anyway, here's what I did to get one working:

added the following code to my .hps file to add the memento when the map loads:
void OnStart()
{
    AddQuest("test","test");
}

In my custom stories' folder I created a file called extra_english.lang containing the following:

<LANGUAGE>
    <CATEGORY Name="Journal">
            <Entry Name="Quest_test_Text">This is a test entry.</Entry>
    </CATEGORY>
</LANGUAGE>

Hope this helps.
09-17-2010, 11:06 PM
Find
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#5
RE: Script and Quest help

It now work,i don't know why,maybe because i put test with a "t" and before i put it with a "T" but it now work and the map will be released tomorrow !
Someone can lock this subject,all my problems are resolved
All i have to do now is make a screen.png for the description
Does anyone know the dimensions ?
Edit : Fixed ! I'm ready for release
09-17-2010, 11:30 PM
Website Find




Users browsing this thread: 4 Guest(s)