Doors
The game I hoping to do is more an adventure game not a shooter, it will be a first person view
The game will be in a regular house with opening swing doors like any home... so on that note, what is the best way to do this?
An animated door or rotate the door by script?
Would it be possible to trigger the door by a mouse/cursor click on the door handle?
Also locked doors requiring a key?
The game will be in a regular house with opening swing doors like any home... so on that note, what is the best way to do this?
An animated door or rotate the door by script?
Would it be possible to trigger the door by a mouse/cursor click on the door handle?
Also locked doors requiring a key?
Re: Doors
All doable!
Have you seen http://forum.cafu.de/viewtopic.php?p=6915#p6915?
I may rewrite this in greater detail if required.
An adventure is a great idea, I'm very much looking forward to it!
Have you seen http://forum.cafu.de/viewtopic.php?p=6915#p6915?
I may rewrite this in greater detail if required.
An adventure is a great idea, I'm very much looking forward to it!
Best regards,
Carsten
Carsten
Re: Doors
Yes I did see it, I'm not very good with lua
I'll persevere a while longer, I'll create a door in the context and I'll see if I can get it working
Can the door be a model? I don't appear to be able to get a model to move and I've noticed that the lifts etc examples are primitives.
I'll persevere a while longer, I'll create a door in the context and I'll see if I can get it working
Can the door be a model? I don't appear to be able to get a model to move and I've noticed that the lifts etc examples are primitives.
Re: Doors
Yes, doors can be models, just add a component as required.
Let me know if you need help.
Let me know if you need help.
Best regards,
Carsten
Carsten
Re: Doors
I will don't worry
Re: Doors
Ok I know have a door triggering but not a swing motion, looking at the MoverBinary this hasn't been added yet?
I thought it might be able to use something like
I'm not to bothered if the door swings instantly open from 0 to 90 degrees right now, I can try to make it better later
I thought it might be able to use something like
Code: Select all
SetRotation(e,0,90,0)
Re: Doors
I've added an issue for this, please see https://bitbucket.org/cafu/cafu/issues/ ... nentmovert for details.
I'll look into it, but if you want a quick solution, just move the doors out of the way linearly.
I'll look into it, but if you want a quick solution, just move the doors out of the way linearly.
Best regards,
Carsten
Carsten
Re: Doors
I guess the "easier" solution would be to animate the door?
Have a range of 100 frames, frames 0 to 49 open the door, frame 50 to 100 close it
Can we call a particular frame range?
Have a range of 100 frames, frames 0 to 49 open the door, frame 50 to 100 close it
Can we call a particular frame range?
Re: Doors
The MoverBinary is a lot more use to me as I'm a Sketchup user, we can't export animation
I'm trying an animated door with Blender
But even the Blender game engine uses a script rather than animation
I'm trying an animated door with Blender
But even the Blender game engine uses a script rather than animation
Re: Doors
it was really easy to get the door to open
I guess now I need to figure out either a mouse/cursor click action or maybe keyboard input? ie a message to click a key to open or close
Code: Select all
local Trigger = ...
function Trigger:OnTrigger(Other)
-- Don't re-enter this code while we're still busy.
if self.IsBusy then return end
self.IsBusy = true
local Map = world:GetRootEntity()
local AniRun= Map.doorani:GetComponent("Model")
AniRun:set("Animation",1)
Console.Print("Door close triggered!\n")
-- Wait 2.1 secs, then become available again for the next trigger action.
coroutine.yield(2.1)
self.IsBusy = false
end
Re: Doors
At this time, the easiest solution by far is to use a trigger volume, possibly a very thin one so that the player must be very close to the door in order to open it (or have his key inventory checked).arfur9 wrote:I guess now I need to figure out either a mouse/cursor click action or maybe keyboard input? ie a message to click a key to open or close
Next easiest solution is using a GUI panel.
If you want something like a "Use" key, I'd have to look into it. Key mapping is not something that works easily or well yet.
Best regards,
Carsten
Carsten
Re: Doors
Right now I have a trigger close to the door with a isopen condition, most doors once open can stay open, it would be exterior doors that need to close
Have you had any luck with the GUI problem?
Have you had any luck with the GUI problem?
Re: Doors
I'm just interested, the GUI is a nice feature
Who is online
Users browsing this forum: No registered users and 14 guests