Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gmap + explosions = no work (https://forums.graalonline.com/forums/showthread.php?t=55958)

prozac424242 11-08-2004 03:56 AM

gmap + explosions = no work
 
Anyone know why putexplosion does not work on my gmap?
It works on indoor levels on my server
but not on the map.

I found this eight month old thread where it was still a problem,
http://forums.graalonline.com/forums...explosion+gmap
surely two thirds of a year has been enough time to address it ...

so, what is the fix to make explosions work in an npc on a gmap?

Slash-P2P 11-08-2004 04:11 AM

Are you using a flat or 3d gmap?

prozac424242 11-08-2004 05:00 AM

it's a flat map ... why do you ask?

hotrian 11-08-2004 07:22 PM

It Works! warpto 30 30
then try, the gmap adds levels, it works on the very
top left level, but no others , the x and y
of mouse is no longer the size of the level but the size of the gmap
mousex x-position of the mouse in the "LEVEL
mousey y-position of the mouse in the "LEVEL
as stated in the commands text document in C: \ Graal2001

other commands may fix this, there is a worldx and worldy script
although i havent used them before, not sure how exactly they work:

worldx(x,y)
worldy(x,y)

convert screen positions (e.g. mousescreenx) to level coordinates; you
must specifiy both x and y so that the functions works correctly on Graal2002 terrain


I will get back to you after i have tested it

osrs 11-08-2004 07:24 PM

putexplosion is deprecated. >=p

hotrian 11-08-2004 08:13 PM

PHP Code:

//#CLIENTSIDE
if (actionleftmouse || weaponfired) {
putexplosion 1,mousex,mousey;
setplayerprop #c, Exploded #v(mousex) #v(mousy);


Using that you can see, mousex and mousey go by the mousey and mousex of the gmap, not the level, the explosion goes to the number, by level, goign on the gmap, the first level (very top left one) it works fine
walking right until the next level keep firing that weapon, as you see the mousex and mousey of the gmap is working, how ever the explosion loads the mousex and mousey of the level, not the gmap itself x_x

Also, No matter if the gmap was a flat, or GK type gmap it doesnt matter, the Gk like map edits the z quality, it would just make the explosion go slighty ubove or below the actual mouse y

Dach 11-08-2004 09:14 PM

alot of those built in things are not supported by gmaps, and I don't believe there are any plans of adding such support

prozac424242 11-09-2004 01:40 AM

so you mean I gotta make a function that does:

call the image that has explosions
changeimgpart to the part of the explosion that I want
play the explosion sound
hurt players/baddies/npcs within the radius

casue thats a lot of stuff to do man ...

Tolnaftate2004 11-09-2004 02:42 AM

PHP Code:

//#CLIENTSIDE
if (playerenters){
  
putexplosion playerx+playerx%64+somex,playery+playery%64+somey;


That will show the explosion on the leel you are on, just replace somex and somey with your x and y coordinates.

Admins 11-09-2004 03:17 AM

Best is to use putnpc2 and to display a gani (setcharani), there should be several explosion ganis around

prozac424242 11-09-2004 03:40 AM

Thank you for the gani tip, Stefan,
but taking ganis and graphics from other servers is
ususally discouraged.

Is there some public gani repository that I can
get a gani explosion from? if so, where is it?

And this still leaves me with a complicated script because
what I want to do is increase the radius of the explosion
as it moves away from the player,
so 4 or 5 ganis would be needed ...

putexplosion works fine offline ... and online if not on the map ...

I guess I can use the old setmap and setminimap commands
for my world, instead of a gmap,
if thats what it takes to make my npcs work?

Admins 11-17-2004 01:24 AM

2 Attachment(s)
These are simple ganis for bomb and explosions. If you want to have explosions of different size then you can probably do a little gani script.


All times are GMT +2. The time now is 02:16 AM.

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