Scripted Player -Char select,attachments,and more

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Scripted Player -Char select,attachments,and more

Post by Veleran » Mon Jun 28, 2010 5:47 pm

Lets say you have nine scripted players to choose from and battle one vs one in a fighting game.

The start is like this.
1. a menu script where you have nine heroes square portrait thumbnails to the right and blnk space to the left.

As you select one thumbnail,it get highlighted and to the left appears a full body -vertically long- image
of the selected character and below it the characteristics,special attacks etc.
Image and characteristics text is all in the pic.no extra text for that.

How do you use commands like mouse over picture and the rest i dont know and have not the time to learn to do from scratch,
so i ask for starting template to help.
I dont know how to load the corresponding actor and script/attributes yet through the selection.

After you select the character you press a button low right "next" and go to next menu -Enemy selection.

2.Enemy selection is done same as you character-thumbs to the right,and large image with statistics to the left.

3.Buy weapon and armor,pendant of resurection (costly) and potion of health with some money attribute that is displayed bottom left.What ever you buy goes to the inventory.

4.Weapon Select- an inventory menu.

5.Choose arena Level to load with thumbnail and after selection a larger image appears to the left where you can read description.

6.Click on "Start Battle" and load the level and enemy with the scripts.

7.A countdown timer that begins counting at the start of the fight and when it reaches zero whoever has more health points left wins the battle.

8.If you survived the time left on the counter is multiplied to some number and you get that amount added to the inventory as time bonus gold.

Next is again the next enemy to fight selection,then buy weapons,which weapon and armor to use in that battle and so on.


Anyone got bug free simple and clean ideas for something of the above,can post.
I will ask later for more because i m not sure i have the right scripted player template.

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Scripted Player -Char select,attachments,and more

Post by Veleran » Mon Jun 28, 2010 5:59 pm

To get an idea,that is from the original 1990 game i remake for my cg society portfolio.
In the old game that is displayed after you select opponent and the level was loaded automatically.


Image

That character has the ability to spit some gum on you or the floor and you get stuck until you move sometimes left and right quickly and get freed.
Of course it is early to script that,just mentioned it.

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Scripted Player -Char select,attachments,and more

Post by Veleran » Thu Jul 01, 2010 9:59 pm

Maybe i should also find a way to script the joypad instead of the wsad move keys,since these games are mostly created for game station consoles and that joypad control of the character helps in combo -special attacks-maybe not.


On the other hand now that i think of it,i know so little scripting,that i would be lucky enough if i get a pawn on his feet working in anyway.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Scripted Player -Char select,attachments,and more

Post by metal_head » Mon Jul 19, 2010 11:31 am

I don't really have time for all of this now, but I can explain the basics of the mouse over thing :)

So basically you have a flipbook on the screen (say 50 x 30) and you've positioned it somewhere on the screen. You just gotta check if the mouse is within this flipbook. You have to make an if-statement, which checks if the mouse position is like bigger or equal than the flipbook position value and smaller or equal to the filpbook position value PLUS the image size.
Like if our flipbooks' X parameter is like 350 and the Y parameter - 400, your if-statement would look like this:

Code: Select all

if((GetMousePosX() >= 350 and GetMousePosX() <= 400) and (GetMousePosY() >= 400 and GetMousePosY() <=430))
{
}
It's a little bit annoying to write all this, but I don't know any better way. You can make your flipbook index a variable, and change that variable if the if-statement gets executed - that way you can make your button get like highlighted :)

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Scripted Player -Char select,attachments,and more

Post by Veleran » Thu Jul 22, 2010 6:03 am

I think i ll use the standard player,and hop the attachments will do the necessary animations since they will got the same skeleton.

I will surpass the menus by adding a small dark room where you see the armor and weapons floating and when you bump on them they ll be added to the inventory and an amount of the gold attribute will be detracted.

I do not know yet how i will increase the gold attribute at the end of each stage (when you defeat the opponent) using the timer by multiplying the time left on the counter
or how i ll determine who has the more hitpoints left when the timer reaches zero (0).
I will ask again later,now what i need is to make the monsters and finally the player.

Also i wanted to make sure that there is no command that can be used against the standard player,
triggered by seteventstate when a monster tentacle hits the player,and use something like attachplayertobone -or something like that so the player will move and rotate during a countdown like he is been held up on the air.

If you have seen movies with giant kraken that attack ships and catch sailors with the tentacles you ll know what i mean.

I think you can position the pawn to the player but not position the player to the pawn nor attach the standard player to a pawn.
I ll remove the extra vertices from the tentacles and add detail elsewhere in the monster probably.

Post Reply