Throwing bushes and stuff
I've been scripting my own movement system for a server, and I've been pondering over ways to make my script more efficient, which hopefully some of you can help me with.
First off, I've started working on a bush-throwing method for my movement script. What I've got at the minute is not terribly efficient in my opinion, as my script triggers the server from clientside, places a bush with putnpc2, and the class npc moves akin to a thrown bush. With this, there is a noticeable delay between throwing the bush and the bush actually appearing, so I was wondering if there were any more efficient ways to achieve the same result. Also, it seems when the player dies and then begins to move again, his default movement re-enables, and my movement script ceases to function. The only way I've managed to remedy this problem is by scheduling an event every 0.05 seconds to disable default movement until the player's hearts are above 0. Again, I'd like to know if there is any function which executes when the player is revived. Anything you guys can suggest will most likely be better than what I have, and it's much appreciated. |
Projectiles for the bush.
As for death problem, script your own health system, or alternatively when the player is hit with health <= damage, toggle a flag that says the player is dead and DON'T subtract the health. Let the death flag overwrite all other movement. |
Quote:
I'm not great with projectiles, so I'll need a few pointers as to how to recreate the path taken by a thrown bush. |
Quote:
shoot(player.x,player.y,2,dir*(pi/2)+(pi/2),.25,1.1,"ce_thrownobj",player.attr[3]); Also read up on: PHP Code:
|
For mine, I wrote a simple clientside projectile system using triggerserver/triggerclient to spawn them locally inside arrays, as I didn't think that projectiles offered quite what I needed to emulate Graal's exactly, but I might've been wrong about that.
|
Quote:
In short, it's great if you're only trying to stick closely to Graal's built-in systems. Otherwise it's necessary to script your own projectile system if you want something perfectly reliable. |
All times are GMT +2. The time now is 12:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.