![]() |
Mouse System :D
1 Attachment(s)
I was checking out the new commands one day, I seen those nice mousex and mousescreenx commands.
I suddenly wondered what a type of mouse control for Graal would be like, lol... So I scripted a Mouse Mode npc. I haven't added onwall or any attacking commands yet. Though, you click where you want to go. Your character walks there, the directional turns seem to work fine. One problem I've noticed, it doesn't seem to work well with that new gani thats on offline mode.. The g2k2 looking guy. Its made for the normal sprites and uses playersprite=(playersprite%8)+1 to change sprites around. Well, I could use some feedback on the npc, maybe giving me more ideas about it or even saying how worthless it might be. |
Sprites are not to be used since the release of 2k1, I think. Use ganis :)
|
Hm, really? I wasn't ever that fond of gani's, probably because I've never been good at making them.. lol
For the longest time I would always script out the attacks and all that. Oh well :p |
for the direction, calculate the x and y distance between the player and the point you click at then use the function stefan added (getdir) to change the players direction
dx = mousex-playerx; dy = mousey-playery; playerdir=getdir(dx,dy); |
I didn't realized he added that function, I'm more used to the older commands.
Anyone have any suggestions to add to the Mouse system? I was thinking of adding a sword attack or a basic attack for the right mouse button. Perhaps scroll through your weapons and or items with the middle mouse button. |
Quote:
|
Quote:
|
In the movement I scripted, I made the position of the mouse override the key-controlled movement when the right button is pressed. I find it easier ot walk that way, if I am lazy or whatever.
|
Yeah, I was originaly going to replace certain keydowns and change basicly all the normal key controls.
Right was going to be used for movement but the issue of the player's profile popping up everytime you clicked over a player was presented. Now that you can remove the profiles, I'm going to swich movement to the right button and action to the left mouse button. Thanks for the getdir commands btw, it saves alot of scripting. When I originaly scripted the mouse mode, you had to hold your mouse button down the entire time you wanted your player to walk. Though, my friend recommended me changing it to click and your player moves there. I actualy like both npcs, maybe I'll put them both up for DL when I add in the getdir and change some code around |
Quote:
|
yeah...
Though, lol... anyone want to give me any example of how to use it? The newfeatures txt file didn't give any explinations on how to use it |
Quote:
|
nice
1 Attachment(s)
Very nice script.
I took the liberty of adding onwall. Its a bit generous in that the player is still one blick away from the wall but it works. |
Well thats cool. Thanks Prozac, saves me some time.
This was basicly an idea I had a while ago, I didn't put much effort into it. If I did I probably wouldn't have posted it for everyone to download lol.. Thanks again for the onwall |
| All times are GMT +2. The time now is 06:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.