View Single Post
  #6  
Old 05-19-2006, 07:41 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Tyhm
Shmaybe what we really need is the Shoot script opened. "Here's how Shoot works behind the scenes, if it was written as a GScript function:
onShoot(x,y,pow,xdir,etc...){
//create the item in question
//probably use Move to move it
//probably something clever with the Move to trigger on a hit
}

So we could copy, edit, and paste our own custom "Fireball ganis" scripted exactly how we like it. The important detail would be that the script's exactly the way it works - if it's a less efficient approximation there's no sense in bothering, we can write our own less efficient approximations, the whole point of drooling over projectiles is they're hardwired to be faster and smarter than our own NPCs.
My only requests here: dynamic wall detection, optional clientside/serverside synch.

Then, if possible, an option (maybe a serverop) not to immediately destroy the projectile when it hits, but to reference it as the 3rd or last parameter onaction(s)projectile that can have it's values modified only in the event.

Classic's system (for traditional projectiles) would only need arrow type, origx, origy, and dir(or)target, and, with enough control of implementation, it would be very easy to abstract that into a class (like how Tyhm was saying here). However, shoot doesn't offer that control of implementation.

What Classic would need to be able to do is reverse an arrow when it hits a player (having a >1 shield power) that is facing the arrow. I only suggest this because I think it would be more convenient, and possibly more efficient than calling the shoot function again from the action(s)projectile event. We would also need to be able to turn off all wall detection except for on most NPCs and players. Now, on the other hand, the clientside/serverside mis-synch is just annoying.

npc.isblockingprojectiles was a good start (considering liftable tiles have been switched to NPCs on classic... wouldn't want them or anything mimicking tiles blocking), though I'm not entirely sure how to implement that. I don't know how.

Also Tyhm, never say to copy and paste scripts, that's what we use classes and weapons for now when we have something we want reusable .
Reply With Quote