Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Particle effects on a gmap (https://forums.graalonline.com/forums/showthread.php?t=64929)

Yen 03-25-2006 02:01 AM

Particle effects on a gmap
 
I have a particle effect which is played in a gani.
The gani is placed at a random point around the player.

If I show the gani on a gmap, however, it shows in the top-left corner (first level) or the gmap. I have no idea why. Do you?

As I tend to screw around when things don't work, I've tried a lot of things. It won't work. :(

napo_p2p 03-25-2006 02:33 AM

Particle effects in ganis on gmaps haven't acted up on me.

I am guessing that it has something to do with either:
x = foo;
y = bar;

Yen 03-25-2006 02:37 AM

I've played with the x/y variables in both the NPC weapon part and the gani part. :/

I've placed particles on the gmap before, it's just this one. z-z

xXziroXx 03-25-2006 02:44 AM

Do:

'x%64' instead of 'x'
'y%64' instead of 'y'

Yen 03-25-2006 02:45 AM

That was what I tried at first :(

jake13jake 03-25-2006 03:52 PM

Quote:

Originally Posted by xXziroXx
Do:

'x%64' instead of 'x'
'y%64' instead of 'y'

wouldn't that force it to the top left?

ApothiX 03-25-2006 06:39 PM

Have you tried something like: x+(64*mapx(level.name)) or whatever?

Yen 03-25-2006 09:20 PM

Quote:

Originally Posted by ApothiX
Have you tried something like: x+(64*mapx(level.name)) or whatever?

Now, there's a good idea.

jake13jake 03-26-2006 06:09 AM

Quote:

Originally Posted by ApothiX
Have you tried something like: x+(64*mapx(level.name)) or whatever?

1. Coordinates belonging to players, npcs, etc. on a gmap are accurate to the gmap.
2. mapx(level.name) is the worst I've seen from you. First of all, it's player.level. Second of all, mapx takes two parameters. Third of all, mapx is not for finding a level's coordinate on a map, but instead to convert screen coordinates to level coordinates.
3. There are functions for getting a level's coordinates on a map, but you shouldn't need it. Try outputting x,y vars in player.chat or npc.chat to verify #1.

ApothiX 03-26-2006 09:12 PM

Quote:

Originally Posted by jake13jake
2. mapx(level.name) is the worst I've seen from you.

Stil not worse than a nickname system taking up 60% of the CPU.

Quote:

Originally Posted by jake13jake
First of all, it's player.level.

Actually, it wouldn't be player.level. From what it sounds like he is using showani() or similiar to do it. If anything: it would be this.level.name (this.level also works, but only because .name is the default member, or whatever.) And you do not have to put this. to reference variables like that. (unless you are in a with() statement)

Quote:

Originally Posted by jake13jake
Second of all, mapx takes two parameters. Third of all, mapx is not for finding a level's coordinate on a map, but instead to convert screen coordinates to level coordinates.

I said 'or whatever', I know there is a function that gets the x position on the gmap with given the level name, but I couldn't remember what it was called off the top of my head.

Quote:

Originally Posted by jake13jake
3. There are functions for getting a level's coordinates on a map, but you shouldn't need it. Try outputting x,y vars in player.chat or npc.chat to verify #1.

See above.

Riot 03-26-2006 09:57 PM

Quote:

Originally Posted by ApothiX
I said 'or whatever', I know there is a function that gets the x position on the gmap with given the level name, but I couldn't remember what it was called off the top of my head.

Perhaps you ment "getmapx", which takes 1 parameter.

jake13jake 03-27-2006 02:59 AM

Quote:

Originally Posted by ApothiX
Stil not worse than a nickname system taking up 60% of the CPU.

And that's called overexhaggerating. Stop being an ass.
getmapx is the correct function, I believe. I'm not sure though.

ApothiX 03-28-2006 12:56 AM

Quote:

Originally Posted by jake13jake
And that's called overexhaggerating.

Not exaggerating. It was clocking 50-60% in showscriptstats.

Quote:

Originally Posted by jake13jake
Stop being an ass.

But you can pick apart my post and try and tell me I'm wrong, when I'm not? :p

Quote:

Originally Posted by jake13jake
getmapx is the correct function, I believe. I'm not sure though.

So you can post if you think that's the function, but I can't?

jake13jake 03-28-2006 07:58 PM

Quote:

Originally Posted by ApothiX
Not exaggerating. It was clocking 50-60% in showscriptstats.

nah, it was clocking 30% for me.
I still love you you know!

Warcaptain 03-28-2006 10:07 PM

A nickname system taking up 30% >_> wow

Bl0nkt 03-29-2006 12:57 AM

mapx(), mapy()

Warcaptain 03-29-2006 04:06 AM

Eh, no its getmapx(levelname) getmapy(levelname)

ApothiX 03-30-2006 03:59 PM

Quote:

Originally Posted by jake13jake
nah, it was clocking 30% for me.

So that automatically means it wasn't taking 60% for me? I forgot your computer ruled them all.

jake13jake 03-30-2006 07:37 PM

Quote:

Originally Posted by ApothiX
So that automatically means it wasn't taking 60% for me? I forgot your computer ruled them all.

A laptop on wireless rules them all? I wouldn't suspect that.

ApothiX 03-30-2006 10:15 PM

Quote:

Originally Posted by jake13jake
A laptop on wireless rules them all? I wouldn't suspect that.

Your connection has nothing to do with CPU usage, but alright.

jake13jake 04-01-2006 07:37 PM

Quote:

Originally Posted by ApothiX
Your connection has nothing to do with CPU usage, but alright.

No, the wireless takes up a ton of CPU because of the university. Anyone could tell when I'm on wireless as opposed to a direct cable link. Anyways, this isn't the thread topic so let's stop arguing.

Skyld 04-01-2006 07:52 PM

Quote:

Originally Posted by jake13jake
No, the wireless takes up a ton of CPU because of the university. Anyone could tell when I'm on wireless as opposed to a direct cable link. Anyways, this isn't the thread topic so let's stop arguing.

My wireless connection does not affect my CPU usage..?

ApothiX 04-02-2006 09:01 AM

Quote:

Originally Posted by jake13jake
No, the wireless takes up a ton of CPU because of the university. Anyone could tell when I'm on wireless as opposed to a direct cable link. Anyways, this isn't the thread topic so let's stop arguing.

I think you are confusing CPU Usage with something else. It doesn't matter how fast/slow your internet connection is, or where it is situated, it will not have any affect on your CPU.

Sage_Shadowbane 04-25-2006 08:44 PM

Ive found that on a gmap with the particle engine, if you use attachtoplayer = true; it tends to stick with the player (If you dont already have that in the script).

Angel_Light 04-25-2006 10:01 PM

Instead basing the light effects off of levels xy base it off the players xy. I had the same problem while back and that fixed it.


All times are GMT +2. The time now is 07:16 PM.

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