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
Replacing tinderboxes and lantern
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#1
Replacing tinderboxes and lantern

I was wondering if it would be possible to change the mechanic of the tinderboxes and lantern, so I could replace tinderboxes with matches, but the matches would also be used to replace the lantern - So that when you bring the lantern out, you use a match (tinderbox) which only lasts a minute or so - You can only do this if you have a match in the inventory, when they're gone that's it. I guess replacing the tinderboxes would be possible, but changing the way the lantern itself works I'm not sure?

Also I wanted to ask if its possible to make a light move at from position to position, like the lights outside a moving vehicle?
11-27-2012, 09:19 PM
Find
Alex Ros Offline
Senior Member

Posts: 447
Threads: 46
Joined: Aug 2012
Reputation: 20
#2
RE: Replacing tinderboxes and lantern

Everything you said is possible.
You have to script the functionality of the matches first of all.
Second you have to script the deletion of one match, when a player uses a lantern.
And for the last you have to model a second hand (with a match) and animate the whole process of firing up the lantern with a match.

Best of luck!
11-27-2012, 09:29 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Replacing tinderboxes and lantern

I think you can do that with a full-conversion.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-27-2012, 10:19 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Replacing tinderboxes and lantern

Scripts cannot directly access tinderboxes.

Tutorials: From Noob to Pro
11-27-2012, 10:29 PM
Website Find
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#5
RE: Replacing tinderboxes and lantern

Thanks for the replies - I will be doing a total conversion I think, as there are a number of things I would like to try to modify/add. Your Computer, just read you tutorial on setting up a total conversion. Very helpful, thanks!
11-27-2012, 11:45 PM
Find
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#6
RE: Replacing tinderboxes and lantern

How would you actually move a light? I've been looking through the possible scripting involved and can't find anything apart from rotating an object. Would it be a animation made in maya which is assigned to the light?
11-30-2012, 01:47 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#7
RE: Replacing tinderboxes and lantern

Make an invisible model with a light attached and move the object. Simple as that.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-30-2012, 07:52 AM
Find
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#8
RE: Replacing tinderboxes and lantern

Thanks, I managed to get that to work but I'm having a problem. Basically, I want the light to move along the length of a train, and once it gets to a certain point, it will reset and start its movement over again and keep looping. I managed to get the light to move properly at the start, but it won't ever repeat the movement. Here is my script:


void OnStart()

{
SetEntityActive("block_box_1", true);
SetMoveObjectStateExt("block_box_1", 1, 2, 10.0f, 0.1f, true);
AddTimer("", RandFloat(1.0f, 20.0f), "TrainLights");
}
void ResetLights(string &in asParent, string &in asChild, int alState)
{
ResetProp("block_box_1");
AddTimer("", RandFloat(10.0f, 20.0f), "TrainLights");
}
void TrainLights(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("block_box_1", true);
SetMoveObjectStateExt("block_box_1", 1, 2, 10.0f, 0.1f, true);
AddTimer("", RandFloat(25.0f, 30.0f), "ResetLights");
}

I have also set the AutoMoveStateGoal in the model editor to 100 so it will travel enough to cover the length of the train. I have an OpenState of 1.0 and the AutoMove button is checked.
12-03-2012, 09:09 AM
Find




Users browsing this thread: 1 Guest(s)