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
Some complicated stuff!
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#1
Brick  Some complicated stuff!

- Hello everyone! I am new member of this community, although this is not first time I am being on this forum! I didn't register and post anything because i didn't have any problems with scripting, level editor, material editor or model editor! I am fast lerner so...! I was watching tutorials and learned almost everything to be known about this HPL2 engine tools! Most help got from Russ Money, Your Computer and freedomnes19.
- I am currently making Amnesia: The Dark Descent custom story called: Another Penumbra Story, in 3 chapters: Deep Underground, Revealed Secrets and Old Facility! First chapter is about 7% completed, other two are in plan!
This story will be using about 200 models, 80 textures and 30 soundtracks and sounds from Penumbra Series and will be converted to Full Conversion mod.
- I learned how to import textures and Models in Amnesia, so when I get my Custom Story Finished i will upload my Penumbra Models Conversion Pack and give you the links.
Thats about me and my thingy since this is my first post. I want you to get closer for my problems and requests!

- Now about what this thread is created for:
1) - I want to make crowbar to broke after it ha been used on 3 doors. If you understand! I am going to make that you can use crowbar on any doors you want in my CS! But I want it to break after it has been used 3 times no matter on which doors it has been used! Example: there is about 9 locked, jammed doors and you can use crowbar on all of them (some doors lead to dead end places, some to resources (like oil, tinderboxes and such), some to real story paths and so on... Can this be done?

2) - Is it possible to disable player for to regain its energy/health? It would be awesome feature to my CS and to some others too. It mostly to make game more scarier and harder. So... the only way to regain healt is to use Landanum thing or Painkillers (in my story)! Its impossible to regain health in such small period of time. If this cannot be done, can this: can you reduce amount of health player get through time or time for player to regain its energy/health!

3) - Is it possible to have lantern and flashlight from WhiteNight in one custom story! Not at same time because I know that it is almost impossible unless major changes are made! I mean like this: you pick up lantern, at some point in area, in my CS, in earthquake, lantern broke, deleted lantern via script, deleted all oil, and oil potiions from imventory (so batteries can be used and show status how much energy in flashlight is left instead of oil, no GUI changes), and then later in game you pick up flashlight! Do you understand what I mean!

- you dont need to give me whole scripts, can tell me just what to do and what to use if you know to solve any of problems/requests here!
- and about Penumbra Models Conversion Pack- all models are converted by me, joints an sounds added, all models are ccurrently working properly!

Sorry about my English if something is wrong. I am from Croatia and English is not my main language!
shadowZgamerZ

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
(This post was last modified: 07-29-2012, 09:22 PM by shadowZgamerZ.)
07-29-2012, 08:55 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#2
RE: Some complicated stuff!

1) The best think I can come up with is using local variables. Then you will just use AddLocalVarInt every time you use your crowbar, and when the variable has reached the desired amount, the crowbar will break.

Here I'll show you one way to put up a function that checks if you have used your crowbar three times:

void CrowbarCheck()
{
if(GetLocalVarInt("CrowbarVar") != 3) return;
//Crowbar breaks
}
If using this, you will just have to make a function that add 1 to CrowbarVar every time you use the crowbar, as the same time as it calls the CrowbarCheck function.
.
(07-29-2012, 08:55 PM)shadowZgamerZ Wrote: 1) - I want to make crowbar to broke after it ha been used on 3 doors. If you understand! I am going to make that you can use crowbar on any doors you want in my CS! But I want it to break after it has been used 3 times no matter on which doors it has been used! Example: there is about 9 locked, jammed doors and you can use crowbar on all of them (some doors lead to dead end places, some to resources (like oil, tinderboxes and such), some to real story paths and so on... Can this be done?
.
------------------------------------------------------------------------------
2) I'm not sure what you are looking for, maybe you could elaborate it a bit?
You can modify the players' health and sanity by using functions.

void SetPlayerSanity(float afSanity);
void AddPlayerSanity(float afSanity);
float GetPlayerSanity();

Modifies/returns the sanity of the player.

void SetPlayerHealth(float afHealth);
void AddPlayerHealth(float afHealth);
float GetPlayerHealth();

Modifies/returns the health of the player.
.
Quote:2)- Is it possible to disable player for to regain its energy/health? It
would be awesome feature to my CS and to some others too. It mostly to
make game more scarier and harder. So... the only way to regain healt is
to use Landanum thing or Painkillers (in my story)! Its impossible to
regain health in such small period of time. If this cannot be done, can
this: can you reduce amount of health player get through time or time
for player to regain its energy/health!
.
-------------------------------------------------
3) Yet, I'm not sure since I've never experimented with the flashlight. I do not think it's possible to switch between lantern and flashlight when it comes to the graphics in the inventory. Maybe between different maps, but that is more than I dare to say since I have no idea. I'll leave this problem to YC or someone who knows.
.
Quote:3) - Is it possible to have lantern and flashlight from WhiteNight in
one custom story! Not at same time because I know that it is almost
impossible unless major changes are made! I mean like this: you pick up
lantern, at some point in area, in my CS, in earthquake, lantern broke,
deleted lantern via script, deleted all oil, and oil potiions from
imventory (so batteries can be used and show status how much energy in
flashlight is left instead of oil, no GUI changes), and then later in
game you pick up flashlight! Do you understand what I mean!
.
(This post was last modified: 07-29-2012, 10:24 PM by Mackiiboy.)
07-29-2012, 10:00 PM
Website Find
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#3
RE: Some complicated stuff!

Thanks for reply! I tough that it will have to do something with variables. Just to ask, for those variables, do i put script in my mapbame.hps or in global.hps! I didnt use variables much so its time to... learn something!
About 2) I mean that when player gets damage (about 80)- 100 - 80 = 20. So he has 20 energy left. I want to energy stay like that, i want it not to increase to 100 (full health - all good) again. So player cannot regain healt by just standing and waiting!

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
(This post was last modified: 07-29-2012, 10:17 PM by shadowZgamerZ.)
07-29-2012, 10:11 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#4
RE: Some complicated stuff!

You put your variables in your mapname.hps.
I've updated my 1st post now, about your 2nd and 3rd issue :]
.
(07-29-2012, 10:11 PM)shadowZgamerZ Wrote: Thanks for reply! I tough that it will have to do something with variables. Just to ask, for those variables, do i put script in my mapbame.hps or in global.hps! I didnt use variables much so its time to... learn something!
Do you know something about other two problems/request?
(This post was last modified: 07-29-2012, 10:24 PM by Mackiiboy.)
07-29-2012, 10:13 PM
Website Find
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#5
RE: Some complicated stuff!

Okay, I will try using variables! Going to watch and read tutorials if there is any! Thanks for reply! If there is someone else who wishs to help and has solution...

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
(This post was last modified: 07-30-2012, 05:31 AM by shadowZgamerZ.)
07-29-2012, 10:20 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#6
RE: Some complicated stuff!

There is prolly better solutions for this one, but this will at least work.
When you want the health to stay at 20hp, call the healthtimer function, which is:

void healthtimer(string &in asTimer)
{
AddTimer("healthtimer", 5.0f, "healthtimer");
if (GetPlayerHealth() >= 20)
{
SetPlayerHealth(20.0f);
}
}

When you want the health to regain by itself again, just use RemoveTimer("healthtimer");

(Note that the healthtimer will not remove the auto regain of health, it will just modify the players' health so it will be near 20hp all the time.)
.
(07-29-2012, 10:11 PM)shadowZgamerZ Wrote: About 2) I mean that when player gets damage (about 80)- 100 - 80 = 20. So he has 20 energy left. I want to energy stay like that, i want it not to increase to 100 (full health - all good) again. So player cannot regain healt by just standing and waiting!
07-29-2012, 10:35 PM
Website Find
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#7
RE: Some complicated stuff!

Then I should do something like this in my .hps:
void healthtimer(string &in asTime)
AddTimer("healthtimer", 5.0f, "healthtimer")
if (GetPlayerHealth() = 20)
{
SetPlayerHealth(20.0f);
}
if (GetPlayerHealth() = 30)
{
SetPlayerHealth(30.0f)
}
an so on... For it to be when player has 20 health to stay on 20 health and when player has 30 heslth to stay at 30 health...
}

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
07-29-2012, 10:49 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#8
RE: Some complicated stuff!

I'm afraid you will have to turn your custom story into a full conversion if you already have not done that, if you want to disable auto health regain. It's possible to modify the speed of regain in the game.cfg file, but, you will need a FC for that. Complex timers would probably work too to work around the problem, but takes some time to make.

I might figure out something better later, but I will be busy for some hours now. Maybe someone else can help you during the time.
Good luck!
07-29-2012, 11:00 PM
Website Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#9
RE: Some complicated stuff!

I thought about the 3rd point of the original post. The way I think that's possible is to make a FC and then change the gui so it works with the flashlight then disable the inventory through script then give the player a lantern and have the inventory disabled until he gets the flashlight then you let the player start using the inventory. Since you can't change the gui while in game.

07-29-2012, 11:30 PM
Find
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#10
RE: Some complicated stuff!

Can be done... Well I dont need for GUI to be changed, at one point when i am having lantern, bar with oil can show me how much oil is left, and later on it can tell me how much flashlight power is left. Just gonna set setLampOil(0) and DeleteItem command to get rid of lantern and oil left. So when pick up batteries it will show me battery status kinda! If you know what I mean. Problem is that I need to remove lantern from game to install flashlight, because of replacing all the files in redist\graphics\lanternstuff!

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
(This post was last modified: 07-30-2012, 05:33 AM by shadowZgamerZ.)
07-30-2012, 05:28 AM
Find




Users browsing this thread: 1 Guest(s)