entity.specframe and font color
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
ErayMan

1. i'm making a battle system in verge 2 and i want my caracter to move two tile to the left while i change manually the frame of the .chr to make him do an attack move. should i use something like:

entity.specframe(0,1);
wait(20);
entity.movecode(0,"L2");
entity.specframe(0,2);
wait(20);

and so on, or is there an easier way to do this?

2. is there a way to change a font color in vergec? or i have to modify the font and change the color myself?





Beans are an excellent source of proteines! So please, be nice with them ...

Posted on 2001-01-11 01:54:39

TheGerf

Just make this function:

void frame(int chr_index, int chr_frame)
{
entity.specframe[chr_index]=chr_frame; // Self-Explan
showpage(); // Shows the updated frame
wait(1); // not sure why, but this helps
}
Then, change your code to this:
frame(0,1); // show frame 1
wait(20);
frame(0,0); //need to show frame 0 or anims won't work
entitymove(0,"L2");
wait(30); // or how long it takes to move L2
frame(0, 2);
wait(20);




TheGerf, not just any gerf.

Posted on 2001-01-11 14:01:43

TheGerf

You would have to edit the font yourself, and in the case of different colours in a BS you could use subsets. I know dick all about them, so check through some docs or TVS.



TheGerf, not just any gerf.

Posted on 2001-01-11 14:47:00

ErayMan

nt



Beans are an excellent source of proteines! So please, be nice with them ...

Posted on 2001-01-11 19:25:42

el_desconocido

Make a function that returns the entire attack as 1 movestring.
Something like:

string attackstring()
{
string move;
switch(entity.facing[player])
{
case 0: move="S4D2Z27W29Z28...Z0S"+str(entity.speed[player]);
case 1:
case 2:
case 3:
}
return move;
}


Then all you have to do is call entitymove(player,attackstring()); and verge takes care of it all for you.

If your version of verge doesn't support the return of strings, just set it use to a global string instead.



-Pontifex
"How many rocks are there, in the whole world?"

Posted on 2001-01-11 22:26:03

TheGerf

What is the 'S' in the movescript?



TheGerf, not just any gerf.

Posted on 2001-01-12 00:25:13

el_desconocido

The W in move codes is in entity processes, not ticks (I just weeks figured out). The "S4" specifically sets the entity's speed such that timing is in ticks, so you can perfectly time sound effects, hit detection, or just when to give new orders. Notice it sets the speed back, when it's done.



-Pontifex
"How many rocks are there, in the whole world?"

Posted on 2001-01-12 04:26:51


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.