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
Few questions
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#1
Few questions

1. How to make scripts work again after death? For example, if monsters show up in certain area and they kill you, in most of the custom stories I play'd happened the thing that when they killed you and you respawned, they no more appeared in that area. Is it somehow possible to make them appear even after you die?

2. How to make credits show up when you die? By this I basically mean that when you're in certain area and monsters appears and kills you, credits start and the Custom Story ends. Is that possible?

3. How to add custom entities? Now I would probably need this one mostly, how do you add custom entities to your Custom Story? I know something about creating new folder called "entities" in your Custom Story folder, but how to make them work and all that?

4. Is it possible to have custom lantern models like flashlight in Custom Story? Do you need to do Full Conversion, or it can somehow be done even without it? I tried to search for this one, no luck.

5. Adding massage to locked door doesn't work for me. I have went through some threads on this forum and tried few of their scripts(of course I edited door name and that stuff), however, no luck of making it work, game started, however, massage didn't appear. Could someone please send me a script of it? (Main command + void, without these "as strings", "float" and such things, because I honestly have no idea what it means....)


Sorry if some of these questions were already questioned and answered on forums or so. Thanks a lot for any help.
(This post was last modified: 04-27-2013, 04:40 PM by Essen.)
04-27-2013, 04:39 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#2
RE: Few questions

1. there is a way, I fixed it for someone. Will put a link to that thread.
2. I'm not sure if this is possible, I really don't know.
3. Nothing else, just put them in the the 'entities' folder inside your custom story folder and you're good to go.
4. You'll need a FC for this. You have to tell the game where to find the lantern, and you can't change that in just a CS.
5. Just use a function for the door like this:
void OnStart()
{
SetEntityPlayerInteractCallback("door", "function", false);
}

void function(string &in asEntity)
{
if(GetSwingDoorLocked("door")===true)
{
SetMessage("Category", "Entry", 1 -Or any other time you want-);
}
else
{
do anything else if the door is unlocked
}
}

That should do it
04-27-2013, 06:15 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Few questions

2.
Easy-peasy

What you do it to create a Checkpoint that makes you spawn in a pitchblack room.
With the checkpoint, comes a callback, which you can put any script line into... Just put the Credits script into there.

????

Profit!

Trying is the first step to success.
04-27-2013, 10:51 PM
Find
Marshall2906 Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 0
#4
RE: Few questions

1.
If you just add a checkpoint:

CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);


Then when you die and go back to it, just make the areas / enemies etc. active by using the code:
SetEntityActive(string& asName, bool abActive);


P.S. Remember to untick the box which reads 'Active' so that they aren't already activated.
04-28-2013, 01:40 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: Few questions

1) It's easy.
PHP Code: (Select All)
AddEntityCollideCallback("Player""ScriptAreaName""PlayerCollideNoDelete"false1); 
The first and last true was changed to false. This is because the boolean function determines whether the callback shall be deleted when first time colliding or not.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-28-2013, 02:34 AM
Find
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#6
RE: Few questions

(04-28-2013, 02:34 AM)JustAnotherPlayer Wrote: 1) It's easy.
PHP Code: (Select All)
AddEntityCollideCallback("Player""ScriptAreaName""PlayerCollideNoDelete"false1); 
The first and last true was changed to false. This is because the boolean function determines whether the callback shall be deleted when first time colliding or not.

So, basically, if I change the "true" thing in my script in my .hps file, the script will be going on over and over again? Like, the script activates, I die, go through script area, it again activates, I once more die, once more go through the area and it again activates and over and over again?
04-28-2013, 03:18 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Few questions

(04-28-2013, 03:18 AM)Essen Wrote:
(04-28-2013, 02:34 AM)JustAnotherPlayer Wrote: 1) It's easy.
PHP Code: (Select All)
AddEntityCollideCallback("Player""ScriptAreaName""PlayerCollideNoDelete"false1); 
The first and last true was changed to false. This is because the boolean function determines whether the callback shall be deleted when first time colliding or not.

So, basically, if I change the "true" thing in my script in my .hps file, the script will be going on over and over again? Like, the script activates, I die, go through script area, it again activates, I once more die, once more go through the area and it again activates and over and over again?
Yep. But after colliding it, you can activate it again.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-28-2013, 03:29 AM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#8
RE: Few questions

(04-28-2013, 03:29 AM)JustAnotherPlayer Wrote:
(04-28-2013, 03:18 AM)Essen Wrote:
(04-28-2013, 02:34 AM)JustAnotherPlayer Wrote: 1) It's easy.
PHP Code: (Select All)
AddEntityCollideCallback("Player""ScriptAreaName""PlayerCollideNoDelete"false1); 
The first and last true was changed to false. This is because the boolean function determines whether the callback shall be deleted when first time colliding or not.

So, basically, if I change the "true" thing in my script in my .hps file, the script will be going on over and over again? Like, the script activates, I die, go through script area, it again activates, I once more die, once more go through the area and it again activates and over and over again?
Yep. But after colliding it, you can activate it again.

A possible fix is to re-add the callback elsewhere. Perhaps the checkpoint callback?

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
04-28-2013, 05:36 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#9
RE: Few questions

(04-27-2013, 04:39 PM)Essen Wrote: 1. How to make scripts work again after death? For example, if monsters show up in certain area and they kill you, in most of the custom stories I play'd happened the thing that when they killed you and you respawned, they no more appeared in that area. Is it somehow possible to make them appear even after you die?

2. How to make credits show up when you die? By this I basically mean that when you're in certain area and monsters appears and kills you, credits start and the Custom Story ends. Is that possible?

3. How to add custom entities? Now I would probably need this one mostly, how do you add custom entities to your Custom Story? I know something about creating new folder called "entities" in your Custom Story folder, but how to make them work and all that?

4. Is it possible to have custom lantern models like flashlight in Custom Story? Do you need to do Full Conversion, or it can somehow be done even without it? I tried to search for this one, no luck.

5. Adding massage to locked door doesn't work for me. I have went through some threads on this forum and tried few of their scripts(of course I edited door name and that stuff), however, no luck of making it work, game started, however, massage didn't appear. Could someone please send me a script of it? (Main command + void, without these "as strings", "float" and such things, because I honestly have no idea what it means....)


Sorry if some of these questions were already questioned and answered on forums or so. Thanks a lot for any help.

Everything is quite easy:

1:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptMonster", "Spawnbitch", false, 1);
}

void Spawnbitch (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Bitch", true);
}

2:

void OnStart()
{
AddEntityCollideCallback("Player", "CheckArea", "Chepoint", true, 1);
}

void Chepoint (string &in asParent, string &in asChild, int alState)
{
CheckPoint (“FirstCheckpoint”, “PlayerStartArea_1”, “Happening”, “DeathCategory”, “Deathtext”);
}

void Happening(string &in asName, int alCount)
{
StartCredits("music.ogg", false, "TextCategory", "TextEntry", 500); ///500 is the length of the credits, dunno how to apply them though
}

3:

Simply open model Editor, make your entity out of something, and save it like:

entities/Myentities/Custimentity

Once there, put the model and texture used, and save the .ent.

4:

It's not possible to do that without overwriting the original file, so if you want to do that, make a Full Conversion (some people are just mind-challenged and don't know how to backup things)

5:

To make a message, simply:

void OnStart()
{
SetMessage("Messages", "Message_1", 2); /// it will set the message two seconds
}

Take note: You need a .lang file for anything related to language (Messages, hints, etc.)

Messages is the category, and the Message_1 the entry. Put them like this:

<CATEGORY Name="Messages">
<Entry Name="Message_1">I'm a message and I worked</Entry>
</CATEGORY>

I hope that solved all of your problems Wink

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-28-2013, 11:36 AM
Find
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#10
RE: Few questions

Thanks a lot for every reply, guys, I will try it all out soon. Smile
04-28-2013, 01:27 PM
Find




Users browsing this thread: 1 Guest(s)