Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Puppet Script

Author
Message
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Jan 2009 03:55
As alot of you may know, I am into machinima.

I have always wanted to do a movie with FPSC, so I have been playing around with a puppet script idea.

I have not invested much time with this yet, so it is really basic at this point.
The keys I use for controls are not friendly with the test builds, so I built a one room level to run this script.
Just placed a prefab, a start marker, a thug, and then set the thug's ai main to the puppet script.
After I saved the level and built the game, I started modifying the script a little.
Anyway here is the basic script so far....


Play with it if you want. (In a built game, not in test mode!)

Controls

'R' = run forward
'T' = walk forward
'F' = turn left
'H' = turn right
'G' = retrace steps
'N' = Rotate head left
'M' = Rotate head right

As long as you hold the key it plays the animation.
When you let off the keys, then it returns to the idle animation.

Once you press a key (say 'r') it will perform that animation even if you press and hold another key.
So, they frist key pressed will assign the animation that is played as long as any key is held down.
Releasing all keys stops that animation.
This way you can roll keys and keep going.

Try this.. press 'r' and hold it down, then roll over to 't' (press t while holding r down then let off r)
'Rolling' the keys allows you to keep running while you turn left or right.
So, try walking then rolling keys to turn while you walk.
It works pretty smooth once you get the hang of it.

Anyway, now I want to make a custom set of animations specifically for controlling with a puppet script.
I also want to incorporate the use of variables in this so it would be possible to toggle from character to character in order to control more than one character at a time for each shot.

Any thoughts on this?

Has anyone else attempted a puppet script for machinima?

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 15th Jan 2009 16:00
I can only sayone thing: AWESOMMMM


I was waiting for this?!! But i didn't know how i could manage it.
Thanks mate... i am gonna play with this baby for a time and see what i can manage..

THANKS MATE




Red Eye - The Game: Work In Progress - W.I.P.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Jan 2009 20:34 Edited at: 15th Jan 2009 20:42
No problem...glad you like it.

Like I said, I just started it so this will evolve as I create the animations for my puppet.
The goal is to have full control of the characters basic actions with a full set of common body gestures.

I will need to create a toggle so that each key can have multiple actions.
Also, like I said before I need to make another toggle for cycling through the puppets. (maybe 4 or 5 max but who knows at this point)
I may work on the toggles next just to assure functionality before committing to the other tasks like animating.

I'll keep you posted of the progress in this thread, because I plan on sharing every tool that I create for FPSC Machinima.

meteorite
17
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 15th Jan 2009 21:19
This is a very useful script, and a great contribution.


*slap!*
Quiet yourself, think before posting, and maybe you won't be as ignorant as you seem.
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 16th Jan 2009 13:02
@Conjured Entertainment:

Nice i looking foward to this, it is going to be fantastic, i am sure of that.


Red Eye - The Game: Work In Progress - W.I.P.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 16th Jan 2009 17:42
...very impressive.

The effort is greatly appreciated...

Let buy you one...


Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 16th Jan 2009 22:20 Edited at: 16th Jan 2009 23:13
Quote: "...very impressive."

LOL
This is really basic so far, but I'll sort it out.

I just made a camera lift script by accident, so once I tweak it a little I'll post it too.
It basically lets you lift the player up and down, which is easy enough but it also holds that height while you move around. (without holding the key)
This is really handy for getting shots from low and hi angles.

I was trying to get a workaround for nanospeed (dismal failure) when I realized the camera lift could be a modified jetpack script.
So, I'll post that as soon as I tweak it. (it's working great now, I just need to add a toggle so you can turn it on and off)


Edit

Here is the cameralift script. (this will work in a test build)
It can be a little buggy, like droping you to you death if you don't have a floor under you, but you'll get the hang of it.

Here is how to set it up....

1) Place an entity in your map that is out of camera view or has an transparent texture. (I used the Sci-Fi > Items > Battery)

2) Set its ALWAYS ACTIVE? to YES

3) Set the script below as the battery's AI MAIN




It may be a little sloppy, but it works.

Here are the controls...

'Z' Toggles the camera lift on or off

    Be carefull not to drop yourself too far when toggling off, or you might take damage.
    Another thing to remember is that toggling on returns you to the last height the lift was set at.

'V' Moves the camera up

'B' Moves the camera back down

Have fun!

chidem
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location:
Posted: 16th Jan 2009 22:55
Conjured, I am sure you are genius with FPSC scripts!
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jan 2009 23:16
Interesting stuff. Will play with it. Always good to see some great scripting innovations. And of course they will always come from CE.



__________________________________________________________
Make life a little easier and use FPI Editpad for your sctripting needs.
Now with Line Numbers in version 3.3.0.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 16th Jan 2009 23:46 Edited at: 17th Jan 2009 16:55
Quote: "Always good to see some great scripting innovations. And of course they will always come from CE. "

Thanks, that is nice to hear and reminds me why I am still here. (I love helping people and FPI)
Sometimes I get discouraged by the responses of some people, and feel like taking a long break from the forums.

I'm working on an earthquake script now. (should be easy to shake the player, right?)

Edit
Okay, I'm addicted; here is the earthquake 'example'... (set up with a battery just like the lift - 'M' to quake)



It's just an example and could be modified to suit your desired effect.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 17th Jan 2009 01:21
I'm sorry to hear that. I know how non-motivating that is. You have been one of those people who really tries to help others with answering questions and as you are in this thread. Sometimes it is good to take a break. I've had a "forced" break and am just getting back into it.

So, take a deep breath, relax and have one on me.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 18th Jan 2009 02:00
Conjured,

The earthquake script is the bomb, and allows endless possibilities. I would ask you if you know how long people have been trying to do this, but I think you already know. Keep working that brain, man.

Well I played around with it a bit, used plrdistwithin to trigger and added a little sound. I think it really can be adjusted to be realistic. The trigger can be hidden, but I was just trying it out. The cool part is that it's hard to move while the earth is shaking. I attached a video.

NOTE: I don't know if this is going to show up... I'm being punished.

Best.

Attachments

Login to view attachments
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Jan 2009 18:30
Bump... because my previous post didn't bring it back to the top.

It seems to be distance challanged or at least works best when the player is in close proximity to the trigger. Did you have the same issue?

Best.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Jan 2009 19:45
Hey xplosys,

I just downloaded and watched your video. Yea, IMHO, I would think that it is a good thing about the player not being able to move. I think it might be somewhat realistic that a person would at least stop for a second. Although, I would be out the door in the next second.

The player is associated with the entity. Now I'm not fully sure how that works but it would seem to me that if the entity the player is associated with is immobile then perhaps the player will also be immobile? I may be wrong about that and most of the time my logic isn't the same as Lee's logic.

BTW xplosys, I like the soundbyte. If it's yours any chance of getting a copy? Maybe you could put it up on your website fpsFREE.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 19th Jan 2009 20:07
Quote: "BTW xplosys, I like the soundbyte. If it's yours any chance of getting a copy? Maybe you could put it up on your website fpsFREE"


...I second that motion!

Nice video. Opens up all kinds of creative avenues...


Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Jan 2009 23:19 Edited at: 20th Jan 2009 00:11
Quote: "It seems to be distance challanged or at least works best when the player is in close proximity to the trigger. Did you have the same issue?"

The only times that happens to me with running entity scripts is when I forget to set the Always Active to YES.
If set to NO then it runs according to the players distance from the entitiy which can cause that undesired effect.

Nice video xplosys
Sounds can make or break a movie too.

Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 19th Jan 2009 23:26 Edited at: 21st Jan 2009 23:18
The puppet script sounds really good! Now if only it could shoot a weapon...


Making the challenge? More like kicking teh nass!
Seen Endangered City yet? It wont last long!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Jan 2009 23:49
Quote: "when I forget to set the Always Active to YES"


Yeah, that pretty much sums it up for me. Thanks again,

Best.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Jan 2009 00:18
Quote: "why didn't anyone reply to my asking questions script? Im going to repost it..."


Maybe timing wasn't very good. You don't have to repost, just bump up the original post by posting to it. You can either just say "bump" or say what you said here.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Jan 2009 01:07
Just spawn a few bits of debris from above and you've got yourself a scary earthquake!

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Jan 2009 01:46
Nickydude,

How about whipping up an original rumble sound for this?

Best.

Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 22nd Jan 2009 18:57
I've cleaned this thread to keep it on topic. Please don't make me have to do it again ok.

Quote: "How about whipping up an original rumble sound for this?"


Howe about I put a rumble sound pack together, including things like; explosions, rumble, bangs, etc then you could have anything from a small boom to a full earthquake.

Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Jan 2009 21:02
Thanks for the free sounds Nickydude

the fps gamer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Home...
Posted: 23rd Jan 2009 16:29
Quote: "I just made a camera lift script by accident, so once I tweak it a little I'll post it too.
It basically lets you lift the player up and down, which is easy enough but it also holds that height while you move around. (without holding the key)
This is really handy for getting shots from low and hi angles."


We could actually use this for making a vehicle script.
An example: We go to the car pressing enter when we are near it when the user presses enter we teleport the player a little bit higher over the car now we will have to maintain the height via this script function you have used CE this will create the third person illusion. Next we can use the vehicle script posted somewhere here on the forum.


- "Are you ready for Dark Nights?"
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 23rd Jan 2009 17:08
@the fps gamer:

Nice methode gonna look into that.. i like it ..


@CE:

WOW JUST WOW WELL DONE Keep it up


Red Eye - The Game: Work In Progress - W.I.P. Red Eye Productions
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 24th Jan 2009 04:06
@the fps gamer
Good idea but you have to remember that you have to freeze or disable the player otherwise the player will be able to look around without the vehicle moving.

I know not with what weapons WWIII will be fought but WWIV will be fought with sticks and stones-Albert Einstein
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Jan 2009 05:06 Edited at: 24th Jan 2009 05:10
@ the fps gamer
Nice idea, but it isn't going to work.
Associating the player is only good for moving up and down, since it was initially intended for lifts.
It will not work when moving the object forward, so we would have to use the plrmoveto=x to follow the entity.
The problem there is that you are placed in front of the object when moved instead of behind it.
Trying to rotate the object before and after the move doesn't work for some unknown reason.
So the only other option is to reverse the entity and move it backwards instead of forwards.
Then our plrmoveto=x would have us behind the object instead of in front.
The problem then is that the moveback=x action that appears in the manual is non-functional, so that won't work either.

I have played around with 3rd person perspective and all I need to make it work is the moveback=x.
I have made a request for this action to be made functional in the FPSC Feature Creep. (MOVEBACK=X move the entity back by X units)
If we get lucky then maybe Lee will add it to an update soon, but don't hold your breathe because he has too much on his plate already.

the fps gamer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Home...
Posted: 24th Jan 2009 11:19 Edited at: 24th Jan 2009 11:20
Quote: "@the fps gamer
Good idea but you have to remember that you have to freeze or disable the player otherwise the player will be able to look around without the vehicle moving.
"


The same thing was done in halo however the vehicle were moved in the direction of the mouse. So you are kinda right

Quote: "@ the fps gamer
Nice idea, but it isn't going to work.
Associating the player is only good for moving up and down, since it was initially intended for lifts.
It will not work when moving the object forward, so we would have to use the plrmoveto=x to follow the entity.
The problem there is that you are placed in front of the object when moved instead of behind it.
Trying to rotate the object before and after the move doesn't work for some unknown reason.
So the only other option is to reverse the entity and move it backwards instead of forwards.
Then our plrmoveto=x would have us behind the object instead of in front.
The problem then is that the moveback=x action that appears in the manual is non-functional, so that won't work either.

I have played around with 3rd person perspective and all I need to make it work is the moveback=x.
I have made a request for this action to be made functional in the FPSC Feature Creep. (MOVEBACK=X move the entity back by X units)
If we get lucky then maybe Lee will add it to an update soon, but don't hold your breathe because he has too much on his plate already.
"


Guess well have to wait then


- "Are you ready for Dark Nights?"
Taterx11
15
Years of Service
User Offline
Joined: 27th Dec 2008
Location:
Posted: 25th Jan 2009 19:43
Awsome script but I have a question. is there a way to allow it to shoot?

Bob Dole sent me, he wants coffee.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 26th Jan 2009 04:15 Edited at: 27th Jan 2009 03:24
Quote: "Awsome script but I have a question. is there a way to allow it to shoot?"

Yes, you can make the puppet not only shoot but kill another character.
I have tested the shooting puppet script and its works great.

Okay, so the guy on the left just stands there like a buffalo, but its only an example...


Quote: "The puppet script sounds really good! Now if only it could shoot a weapon..."


Here's all you need to do to the puppet script above to make it shoot... (canabalized a stock script for the shooting)

0) Edit your state=0 to read like the following...

:state=0:settargetname=isshot,state=1

1) Add the following single line to state=1...

:state=1,scancodekeypressed=54:rotatetotarget,state=10

2) Add the following two states under state=9...

:state=10,ifweapon=1,rateoffire:useweapon,rundecal=6
:state=10,ifweapon=0:state=11,setframe=6
:state=10,scancodekeypressed=0:state=1

:state=11,:incframe=6
:state=11,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav

3) Place a character with a gun and assign him the puppetshooter script (your new script) to his AI MAIN
    Also edit his rate of fire to 100

4) Place a character without a gun to get shot and change his name to isshot
    You can adjust his health lower than 100 also if you wish for a faster death

5) Have fun using the right shift key to shoot!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 05:27:03
Your offset time is: 2024-03-29 05:27:03