enemy possesion script thread.

Discuss any other topics here
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

enemy possesion script thread.

Post by psYco »

I am starting a new project and have in mind several ideas that Im just not sure how to execute, I was wondering if It would be possible to make the main player posses his enemys thus taking controll of their bodys and weapons, (it will be a third person game in which you have no weapons and no way to use any, you will have to use wit to evade puzzels) many of these puzzels will involve possesing guards and using them to kill other guards! :twisted: Can any one help me script this :D

Thanks in advance!

(edit) Rather than making another post later I will ask for help with all the features I plan to include but am having trouble getting to work here (edit)

Can I auto direct the player, beacause I dont want the player to miss important details of the game, eg, the player is running down a path now I play a siren and spin the player around so that they see they are now being chased by a guard.

Is it possible to force the player to spin aroud or look in a certain direction please help :)

Thanks again :D
Last edited by psYco on Wed Sep 06, 2006 4:10 pm, edited 6 times in total.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

You may look at the scripted player. It is basically a pawn that is controlled by the player...

There are a few script commands to move and rotate the player (PlayerToPosition, PlayerMatchAngles, ... )
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Thanks but I dont quite know what you mean I was also wondering if it would be possible to change the perspective when the guard is possed ie the game is 3rd Person but when you posses the guard I want the game to go 1st Person,

I also want to change the hud when you posses the guard so the hud can cover most of the screen (you see the guards wear gas masks) so when you posses them I want the player to look through the eyes of the gasmask, (I wanted to see what you see in a gas mask so I bought one on e-bay :D and you field of view is greatly decreased)

Can any one help? (with the posseing and view + hud change or is there another way, to make it look like your wearing a gas mask)

oh if it helps in the third person view there will be no HUD, (you get shot you die, like in the real world) so in the guards case the HUD would only be an image to look like your wering a gasmask 8)
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

it would be rather difficult to do this in RF.

if you want an example of how this works though, take a look at "Metal Arms Glitch in the System". (xbox, ps2, cube)
Check out my band
Tougher Than Fort Knox
Image
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

I already know how this is going to work for my game, It will add several different, interesting dynamics, allowing for complex puzzels, I also have an Idea for a force field type thing that only the guards can go through so to access certain parts of the map you will have to posses a guard, this will make for some new fresh game play!

Im just realy desperate for some help with the scripting of all this :cry:
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

Post by LtForce »

Scripting is always a problem I think... Programmers make languages as hard as can be :twisted: :twisted: :twisted:
Lithuanians for Georgia!
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

Why would we want to do that?

Use pure C++ for a couple years, then we can talk about how complicated SimKin is :P
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

I was just wondering AndyCR, I know your probably too busy with RF2 (I cant wait 4 it!) to help, but is what im trying to do, (essentialy switch players, and change the hud, when possesing the enemy) even possible in RF,

(i actually think simkin is one of the easiest languages out their, Ive picked some up already with NO prior scripting exp. not even HTML!)

But could some one pls tell me if this is do-able, its the core focus of my new project. And if so how to get started! PLEASE :( :?:

Or will my dream of an individual in a world where every one has been tricked into conformity, realising that they are differnt and rebeling, only to discover there is a whole world out there where his people are free, and he must now inherit the powers of the ancients to free the others, and destroy the force converting the free to the slaves... never be realised.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Yes, it is possible.

***EDIT***
Sorry, I've had no chance to visit the forums in the past few days.
Tomorrow it's time for me to go back to school and I'm kinda busy but I'll try to write something more detailed soon...
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Thanks! :D Dont worry about time since I already plan this to be avery long project, and my holiday will also soon run out and I wont be able to work on it except mabey on sundays, besides I am at the moment just learning how to use blender, (the n00b to Pro wiki book is lik 300 pages long! :shock: ) to do my cutscenes and then Ill start the script and level lay out and the cutscene desighn to make sure they all piece together.

But you have no idea (okay you probably do) how good it is to hear that your ideas arnt just a dream! :D :D :D :D :D :D
User avatar
Ransom
Posts: 30
Joined: Sat Jan 14, 2006 7:16 pm

Post by Ransom »

Yes, this is all possible.

Use the command SwitchView(int View) to change from 3rd to first person and back.

I would make the possesed guard(s) the 1st person player and use
PlayerToPosition(float OffsetX, float OffsetY, float OffsetZ, bool Flag )
to move the guard (1st person player) where he needs to be at the time.
For the actual player (your hero, the guy we see in 3rd person) you can use either the third person player or use a scripted player as QoD suggested. The scripted player basically attaches the camera to itself and is manipulated via script.

The commands...
SetHudDraw(bool Flag );
GetHudDraw();
ActivateHudElement(char *AttributeName, bool Flag );
...can be used to turn off/on the HUD or enabled certain aspects of it, the gas mask for example.

The gas mask could also be done as an overlay entity with a trigger to turn it off/on as needed.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Thanks alot for the input, (wicked avatar BTW :D ) I understand what your saying but, am not too sure what a scripted player is, (well I understand the concept) but Im not such an adept scripter that I can make a whole scripted player frm scratch, I can edit scripts ok though, so If you could tell me where I can find a scripted player, then with a little help I think I could implement what your saying! :D

Thanks again, If I understand you rite, after I have a scripted 3rd person player, I could with a little help edit it so I could at the press of a button posses a guard, (who would be a control-able Pawn? ) and switch to a hud that gives the effect you are wearing a gas mask!

Oh I dont mean to get too complicated but can I set it that you can only posses a guard while looking at them? And can the guard be killed when you are done with them, exiting the possesed state (returning to the player) also can it be done that when the guard dies you return to the player? (allowing you to kill the guard in fun ways!) :)

[edit] All assistence will recieve mention in the game credits and on the games website, as well as a secret shrine to them hidden in one of the game levels! [/edit]
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Oh I dont mean to get too complicated but can I set it that you can only posses a guard while looking at them? And can the guard be killed when you are done with them, exiting the possesed state (returning to the player) also can it be done that when the guard dies you return to the player? (allowing you to kill the guard in fun ways!)
That may sound complicated but after all it's pretty easy to do once you have a scripted player. You'll probably have to create the player script from scratch, that way you can get the optimal script for your needs.

Just let us know when you start the scripting and (at least) I will help you in any way I can.
Pain is only psychological.
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

Post by LtForce »

Juutis wrote:Yes, it is possible.

Tomorrow it's time for me to go back to school
What do you mean? Summer haven't finished yet or do you live in Germany? Sorry for offtopic
Lithuanians for Georgia!
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Well, im still doing a couple hours a day studying Blender but reading the whole tutorial nonstop is very tedieus :x so Instead im going to learn little bit by little bit, and will start the scripting of the game now. I already have most of the models im gonna use (at least the guards and the Player) so I want to get this part of the script out of the way, so I can see it in action and I can desighn a level, make it, and implement the basic game dynamics and see how it looks and feels, later Ill add details like sound, modells and cutscenes, although im planning my cutscene tree along side the level tree, this way the cut scenes will flow with the game and not feel bolted on.

I am going to Londen tomorrow and will stay there for two nights and coming back wednesday.

So will post again then, basically I have no idea how to make a scripted player, so mabey I should start with a template?

Well this is what I need from the scripted player; The player will be third person, No HUD (the payer will be killed if he takes just one shot), The player needs to be able to posses and then controll a Pawn in the first person with a differnt HUD also ounce in controll of the Pawn the player muct be able to kill the guard by pressing the posses key again, the player must only be able to posses a guard he is looking at, The player must be able to push a button in the level, he also needs to move jump and if possible climb a wall.

I want him to make a sound when he falls from a hight but not die or loose health, thanks soooooo much for the help :D till Wednesday afternoon.

psYco is out.
Post Reply