Scripts / Door explosion script (need a bit help)

Author
Message
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 24th Mar 2015 21:08
I made a explosion from a door in 100 frames.
See video.


It actually works.
I made a trigger script for that, i can explode the door but then the next door and then again the next door.
See video
They are building door faster then i can blow up
How do i made the scrip to stop after the blowup.





Many thanks
Harry
PM
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 24th Mar 2015 21:54 Edited at: 24th Mar 2015 21:57
I am really bad with lua :
I have an exploding wall that looks like what you are doing with the door. I use the rocket launcher , in the code I use I have


SetAnimation(0)
PlayAnimation(e)
CollisionOff(e)

Try adding this line > ActivateIfUsed(e)
I am not sure of all the key press code you are using .
Maybe this one line will help you .

Lance
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 24th Mar 2015 22:31


tried it but that does not work for me.
I tried destroy(e)
But then the door is gone after pressing e with no animation.
I tried to put in different places. but with the same result.
so keep trying....

Harry
Harry
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 12:18
Anybody..?
Harry
PM
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 25th Mar 2015 12:24
-- This works on my exploding wall --


local pressed = 0
function trigger_init(e)

end

function trigger_main(e)

if GetPlayerDistance(e) <= 150 then
Prompt("Press E to Blow up the wall")

if g_KeyPressE == 1 and pressed == 0 then

SetAnimation(0);
PlayAnimation(e);
CollisionOff(e)
ActivateIfUsed(e)
pressed = 1

end

end
--if g_KeyPressE == 1 and pressed == 0 then
--CollisionOff(e)
--end
--pressed = 1
--if pressed == 1 and g_KeyPressE == 0 then
--pressed = 0
--end

end

Lance
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 13:31
Give this one a try:


I did not test it. So I can not garantee for anything
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 13:47
Thank you very much for your help.

I've got the same result.
The door explosion animation works, but there is Always another one in place just like the video.
strange..
If i look at my animation in 3ds it looks fine and just one door. in pieces.
Maybe a setting in the fpe file?

cheers

Harry


Harry
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 13:58
wrote you a pm
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 14:09
Thank you all for helping
But i saw just now that is was my mistake
. in 3ds i unhyde everything and saw that i forgot to delete the complete door, so with exporting the unhide door was also exported.
So really my bad.. sorry for that. i was it forgotten i think.
Youre script works now just fine..
Again many thanks and sorry..

Harry
Harry
PM
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 25th Mar 2015 16:28 Edited at: 25th Mar 2015 21:34
Glad you found the problem .

PM

Login to post a reply

Server time is: 2024-12-21 15:00:47
Your offset time is: 2024-12-21 15:00:47