Hi
Okay, so I would like to create an end sequence to my game where the character enters a room and the bad guy
is walking towards a door and you need to go into your inventory and click on the gun and aim it at the bad guy or
else he will get away. I'd like it to be timed so you have only a set time to do this or he will walk away.
If it can't be done I will settle for scripting a cut scene but I just wanted to try this first.
Any help would be greatly appreciated.
Thanks.
https://m.youtube.com/watch?v=r3w5TI7_a2g
I'm on my phone, and I hate typing with it, so I'll place this here to get you started.
Hi NickyNyce
I watched the video and I believe I now have a good Idea of how to script the scenario. Thank you
for providing the link.
Okay, I have the timer sorted but how do I make it if,else for getting the gun from the inventory and moving the cursor
over the character before the time runs out and the else happens?
Thanks
You can set the timer in AfterFadeIn. Time it so that it takes so many seconds to where when your character reaches the door, the timer will expire. In Repeatedly Execute check if the timer is expired.
function room_AfterFadeIn()
{
SetTimer(1, 300);
}
function room_RepExec()
{
if(IsTimerExpired(1))
{
cBadguy go in the door...You lose
//Yada yada yada
//load last save
}
}
If you use the gun on the badguy....
function cBadguy_UseInv()
{
if(cChar.ActiveInventory==iGun)
{
cChar.FaceCharacter(cBadguy);
cChar.Say("Die Mo$#%er Fu$%er. ");
//show Badguy dying
//You saved the world...Yada yada yada
}
}
But now you have me thinking. If you use the walk command for your Badguy, that would be blocking. And this is exactly why I should not be posting. :X
Thanks Nicky
I will work on this tomorrow and see if I can do it, it's getting late. Thanks again.
Don't thank me yet. I have a feeling you're about to run into a problem as I mentioned above.
I'll let you know.
Hi Nicky
It worked perfectly for what I wanted, no problems.
Thanks again for your help, appreciate it.
Thanks NickyNyce! :)