![]() |
Add spell - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Add spell (/showthread.php?tid=360) |
Re: Add spell - Gilgamesch - 14-10-2006 figo566 Wrote:Hello everybody that is kinda tricky ^^, if you understan dthe basics it shouldnt be too hard for you, but i am not sure if you know some vb, if you dont, you should go and learn it first, since this is more advanced and i am sure there wont be anyone giving you a tut for this :/ if you need help, add me in msn ![]() - pingu - 14-10-2006 It wouldn't be too hard. Just make a new variable in the player type called "Para As Long". Make a new spell type following the same format as the others. When the spell is casted on the player for that tpye, just do "Para = GetTickCount". Then, add a little thing in "CanPlayerMove" that checks if "Para > GetTickCount + 5000 ' 5000 = 5 seconds" and if it does, just say they can't move. NOTE: "Para" would actually be written as "Player(index).Para" in the code. - Gilgamesch - 14-10-2006 figo566 Wrote:and the poison ?? you have to save a lot of information into the players info for poisen, like: by whom etc. as i said, it isnt as easy as it may seem first, it surly isnt for beginners - Leighland - 14-10-2006 Well first you have to et up the spell type. Which I'm not willing to do, it's easy. Then check if the player has been poisoned. If so, send data to the client which starts a timer with and interval of (wahtever you wish) 2 seconds, just for giggles. Also, set up a global variable called PoisonLen. Make sure you send a "flag" to tell that variable how many times to make the timer "tick". The timer code might look something like this (doe off the top of my head, probably not right): Code: Sub Timer1_Timer() This will only effect the player contolling the client as far as I know. You probably want to have eveyr person in game see if a player is poisoned, and if I wasn't so tired right now I could probably lead you on the right path. |