Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   Gmaps, bombs, and arrows (https://forums.graalonline.com/forums/showthread.php?t=66551)

excaliber7388 06-08-2006 05:17 PM

Gmaps, bombs, and arrows
 
Ever since we got a gmap on our server, the bombs and arrows havn't worked.
What could this be caused by, since other servers don't seem to have these problems. (Also, baddies won't appear)

napo_p2p 06-08-2006 09:40 PM

Baddies won't work on gmaps.

Defualt bombs and arrows won't work on gmaps (although, it is really easy to script your own).

excaliber7388 06-08-2006 11:06 PM

Quote:

Originally Posted by napo_p2p
Baddies won't work on gmaps.

Defualt bombs and arrows won't work on gmaps (although, it is really easy to script your own).

So, would I be able to use put NPC and classes?

konidias 06-08-2006 11:20 PM

Quote:

Originally Posted by excaliber7388
So, would I be able to use put NPC and classes?

yes. that is the general idea.

excaliber7388 06-08-2006 11:33 PM

Quote:

Originally Posted by konidias
yes. that is the general idea.

Does anyone have an example of a bomb script? I'm not sure what NPC is messed up, but I think it's my bomb class:
Class:
PHP Code:


function onCreated()
{
  
showimg(10,"bomb.png",x,y);
  
setshape(1,32,32);
  
settimer(3);
}
function 
onTimeout()
{
  
putexplosion(x,y,1,3);


And the script calling this class:
PHP Code:

function onActionserverside()
{
  
join("bomb");
  
putnpc2(playerx,playery,{join("bomb")});
}
//#CLIENTSIDE
function onWeaponfired()
{
  
triggeraction(0,0,"serverside","Bomb test","bomb");



Prozac 06-09-2006 05:51 AM

putexplosion dosent work on gmaps either - not in my experience of trying on it on two diferent servers.

These are they types of things that should come along with your server for free when you buy it - ready to use npcs in the database for bomb and bow that work on gmaps. I mean, for years before npc servers, these worked without us doing any extra work. but now every single classic-type server has to go and waste their time re-making the exact same effect.

just include it with the new servers.

they way i tried it before was to do putnpc (or putnpc2) with an explosion gani and triggeraction on the places where the gani would show - to duplicate the classic effect of the bomb, just gotta time the triggeraction to damage the hp right and experiment a bit to account for serverside damage and the appearing of the gani on screen

excaliber7388 06-10-2006 10:27 PM

Quote:

Originally Posted by Prozac
putexplosion dosent work on gmaps either - not in my experience of trying on it on two diferent servers.

These are they types of things that should come along with your server for free when you buy it - ready to use npcs in the database for bomb and bow that work on gmaps. I mean, for years before npc servers, these worked without us doing any extra work. but now every single classic-type server has to go and waste their time re-making the exact same effect.

just include it with the new servers.

they way i tried it before was to do putnpc (or putnpc2) with an explosion gani and triggeraction on the places where the gani would show - to duplicate the classic effect of the bomb, just gotta time the triggeraction to damage the hp right and experiment a bit to account for serverside damage and the appearing of the gani on screen

Thanks, it would be nice if those scripts were available, but I guess this will do ;) Thanks :D

napo_p2p 06-13-2006 11:01 PM

PHP Code:

//#CLIENTSIDE
function onWeaponFired() {
  if (
player.bombs 0) {
    
setani("vi-bombdrop"" ");
    
freezeplayer(0.5);
    
sleep(0.5);
    if (
isOnMap) {
      
temp.px player.- (64 getMapX(player.level)) + 0.5 vecx(player.dir)*2;
      
temp.py player.- (64 getMapY(player.level)) + 0.5 vecy(player.dir)*2;
      
putBomb(1temp.pxtemp.py);
    }
    else {
      
putBomb(1,player.vecx(player.dir)*2player.0.5 vecy(playerdir)*2);
    }
    
player.bombs --;
  }


That works on a gmap (need to change gani though).

excaliber7388 06-13-2006 11:27 PM

Quote:

Originally Posted by napo_p2p

That works on a gmap (need to change gani though).

<3 Thanks! :D
The bow works like this, but the arrow loops through the level (like asteroids)

And how could I encorporate this into it's class, without using player.x/y (classes can't detect that?)


All times are GMT +2. The time now is 12:30 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.