![]() |
Scripting Baddies
I've been trying to make original baddy scripts for Classic, and I though that a good way would be to make ganis for them. However, I've been having loads of trouble.
1. setshape will not work on showcharacters. a. small image sprites: the frog baddy won't pick up a hit for me because it's too small of an image in the gani b. large image sprites: the tree baddy will only block a 32x32 square instead of the entire area it's on. 2. showani will not work serverside. Anybody have some kindof advice for me? I would really appreciate it. |
Quote:
And you are right, showani() is a clientside function. It does not exist serverside. The baddies I've seen are images with a setshape(), not showcharacter. |
the problem is that the animations are set by different actions that the baddy does. I mean, perhaps the tree baddy might be more functional clientside if I really think about it, but that would still leave the frog as a problem. It wouldn't be a major problem considering that the only real animated part is the grass shifting. I can do the frog jumping alright, not quite so good, with a few move algorithms. The only way to really do serverside to clientside translation is through a save var and that's very very inefficent, although it proves functional in my unfinished chess scripts (and I have bigger projects on my plate now, so I'm not going to finish it's self-check check any time soon). Would a for loop cycle with a sleep of .1 create lag problems on the NPC server? Also, would short time intervals on the movementFinished event handler cause lag problems?
Besides this, most of the baddies I'll be doing would be functional with showcharacter. I can probably limit myself to thinking 32x32 after all of these issues. Though, I just can't help but think how nice it would be if showani worked serverside. Just a few functions that are clientside-only that would make sense to have serverside. |
jake simply don't use showcharacter... you could go trough the trouble of scripting your own "gani" withouth using ganis.. Simply by using setimage or showimage multipletimes :O and than changing the image on each step... that would get rid of your shape problem ?? :O
|
Quote:
|
Quote:
1. It would obviously need at least a .1 timeout. (can't do it serverside). 2. There is bad serverside to clientside lag for changing modes. But hey, I could try. |
Quote:
|
hmm... do you think putnpc2ing the grass stuff and then just using the froggy image would work?
I think it just might! |
no offense, I don't mean to be rude...but why don't you try before asking?
|
Quote:
.... Not technically out loud... --but with my fingers. I'm like 99% certain it will work that way though. |
Well, I'm pretty sure the following way would work and be more efficient:
Put the baddy's mode in a save[]. Use a clientside timeout to read the save. Draw the baddy's sprites, based on the save. save[0..9] holds values that can be set and read on both the serverside and clientside. You could set the baddy's mode to a save in the serverside, then have it draw the baddy on the clientside, based on the save's value. |
no, not really efficient, it really takes a while for saves to save.
|
| All times are GMT +2. The time now is 11:25 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.