objects/character

Started by Pie-rat, Wed 22/10/2003 23:59:12

Previous topic - Next topic

Pie-rat

I need to know how to turn a character on or off. i am making a game with an animation intro and i need the char, to appear after the animation ends.  i also wanna know how to give a set amount of skill points and then how to raise the and eventually be able to do something i couldn't. ex: Hero's quest how he throws rocks and climbs till he can hit the nest or climb the tree/wall to get the seed and shyt. if there is anyone who could help me personally with my scripting needs as i come to them that would be great. thanx
:@)

InCreator

1. This is probably wrong place, try beginners forum
2. You may move character out from screen (giving him larger x or y coordinate than room is), or (if it's non-player character), set his room -1.
Seek for more info under help (Text Scripting Global Variables)
3. Skills? Learn everything about SetGlobalInt and GetGlobalInt

Pie-rat

it's a little easier to understand if i have some1 explain it cause it confused me when i read it. plus i lost it.
:@)

CB..

on the skills thing, im pretty much in the same boat (i haven't gotten to grips with the scripts enough to start writting global variables yet) so im simulating these things as best i can untill i do understand that it is i need to do..that way i can continue to script the game , learning a little more as i go along , then when i do (eventually) grasp the nessecary technique i can redo certain parts of the game to suit..

for the skills thing yu can give the player an inventory item which will then allow him to complete the task  (as an compromise)

or add a region round that tree or areas where yu want him to attempt the task

and use the interaction option



when player walks onto region

run script

if (game.score > 55)
AddInventory(3);





so if the players score is greater than (in this case) 55 he will be given inventory item 3

yu can alter the 55 to any number yu want to suit the game and the same with the inventory number  and the > means greater than ( < would mean less than etc)


this is the sort of thing im using untill i learn better ways of doing things

in my case im writing an escape from colditz game and the player can't succesfully escape untill he has a score greater than 300, (not quite as simple as that but thats the basic mechanics of it )    

Squinky



I guess a way of doing a skill system...where, lets say a guy named Sven wanted to be the champion Hula-hooper, and had to practice until he was good enough would go like-a-a-so:

//character practices with hula-hoop by clicking on object or something
//and by putting this script in you would increase global 1 by 1 points
// every time
SetGlobalInt (1,GetGlobalInt (1)+1);
AnimatCharacter (yadda yadda);
Wait (20);


//character goes to tournament and trys to win contest
//

if (GetGlobalInt (1)<=30){
Display ("You drop the Hula-hoop and shame your family for generations upon generations");
Display ("In other words you lose");
}
else if (GetGlobalInt (1)>=30){
Display ("You are like the king of hula-hooping");
Display ("Which would be good if it were at all masculine");
Display ("So in other words you win");
Display ("And Squinky Rox0rs");
}


that should do it in theory, but I'm sure somebody cooler than me will come along and tell me off...


Ishmael

if (GetGlobalInt (1)<=30){
else if (GetGlobalInt (1)>=30){

if the if's were tried to run at the exact same time, this would probably crash the game :P This sets the min required score to 31... maybe put like so:

if (GetGlobalInt (1)<=29){
else if (GetGlobalInt (1)>=30){

but that's the genral idea... of cource you can do it in some other way, more complicated, I belive...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Squinky

bah, you got a point...didn't notice that...and yeah it can get a whole lot more complicated...

SMF spam blocked by CleanTalk