adding a new function to gui?

Started by Femme Stab Mode >:D, Tue 07/10/2003 06:15:50

Previous topic - Next topic

Femme Stab Mode >:D

So I'm finaly taking interest in scripting. What I want to do is add a "poke" function to the gui, making it similar to walk and look, etc. Like if the main character pokes a person his view will change, and the character poked  will react differently from when the main character interacts with him/her. So, can someone give me the basic idea of how I would script this? It doesn't seem too hard.
NANANANANANA ASSHOLE!

Ishmael

Probably the best way (as I see it) is to make a whole new function for the pokeing, then run it from a GUI buttonpress. In the GUI, set the "Poke" button to run script, the in the GUI script set the if's so thet the pokeing function is run when it shoud. ;)

function PokeCharacter(int CharID) {

SetCharacterView(EGO,pokeingview);
AnimateCharacter(EGO,0,0,0);
while (character[EGO].animateing == 1) Wait(1);
ReleaseCharacterView(EGO);
SetCharacterView(CHAR,pokedview);
AnimateCharacter(CHAR,0,0,0);
while (character[EGO].animateing == 1) Wait(1);

}

or something... Needs refining! ;D
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.

SMF spam blocked by CleanTalk