Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Elysium Source Forum Index » Approved Tutorials

Post new topic   Reply to topic
Click To Actions
View previous topic :: View next topic  
Author Message
Remedy
Newcomer


Joined: 17 Jul 2006
Posts: 26

PostPosted: Mon Jul 17, 2006 10:47 pm    Post subject: Click To Actions Reply with quote

For this I suggest using Pingu's Click to Move code
also. This code will allow you to pick up items by
clicking with left mouse button and attacking with
right mouse button.

Find
Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)


If you do NOT have Click to Move then
Replace Whole Sub With:
Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
                ControlDown = True
                Call CheckAttack
    End If
   
    Call EditorMouseDown(Button, Shift, X, Y)
   
    If frmMapEditor.Visible = False Then
    If Button = 1 Then
            Call PlayerSearch(Button, Shift, X, Y)
            Call CheckMapGetItem
        End If
    End If
End Sub


If you DO have Pingu's Click to Move then replace
the whole sub with
Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
                ControlDown = True
                Call CheckAttack
    End If
   
    Call EditorMouseDown(Button, Shift, X, Y)
   
    If frmMapEditor.Visible = False Then
    If Button = 1 Then
            Call PlayerSearch(Button, Shift, X, Y)
            XToGo = (X + (NewPlayerX * PIC_X)) / PIC_X
            YToGo = (Y + (NewPlayerY * PIC_Y)) / PIC_Y
            Call CheckMapGetItem
        End If
    End If
End Sub


- Mate, Remedy.
Back to top
View user's profile Send private message
Aqueous
Member


Joined: 23 Feb 2006
Posts: 154
Location: Melbourne, Australia

PostPosted: Tue Jul 18, 2006 5:06 am    Post subject: Reply with quote

Awesome. While I haven't tested it, the concept is great Wink
_________________
Back to top
View user's profile Send private message
GoldXeta
Sr. Member


Joined: 05 Apr 2006
Posts: 290

PostPosted: Tue Jul 18, 2006 11:45 am    Post subject: wow Reply with quote

Wow, I never thought of that, VERY NICE! Im getting owned by people with 7 posts, sad guys, Im MELTING!!!!!

Thanks for the idea, maybe I can improove upon it... Razz
_________________
[align=center:37a6ae06da]
[/align:37a6ae06da]
Back to top
View user's profile Send private message
PIX3L
Member


Joined: 16 Apr 2006
Posts: 158
Location: Canada Points: 14

PostPosted: Tue Jul 18, 2006 1:36 pm    Post subject: Reply with quote

Maybe like adding a continous attack Surprised . Like you only have to click once and they attack back and fourth so they dont have to keep button mashing XD.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
halla
Jr. Member


Joined: 06 Jun 2006
Posts: 68

PostPosted: Tue Jul 18, 2006 1:54 pm    Post subject: Reply with quote

This maybe stupid but where does it determine if you are next to the monster to attack it. I added something to this and I can right click anywhere to do it not just on the monster.

And yeah continuous attack would be good. Sure wouldnt be too hard.
Back to top
View user's profile Send private message
NexSteve
Sr. Member


Joined: 04 Mar 2006
Posts: 548
Location: Missouri

PostPosted: Tue Jul 18, 2006 3:27 pm    Post subject: Reply with quote

It works awsome tut!
_________________

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Remedy
Newcomer


Joined: 17 Jul 2006
Posts: 26

PostPosted: Tue Jul 18, 2006 6:11 pm    Post subject: Reply with quote

The reason click to attack is right click is because
if you have a bow/ranged weapon equipped you
wont shoot everywhere you move.

- Mate, Remedy.
Back to top
View user's profile Send private message
NexSteve
Sr. Member


Joined: 04 Mar 2006
Posts: 548
Location: Missouri

PostPosted: Wed Jul 19, 2006 12:55 am    Post subject: Reply with quote

Ohh i see what your saying.
_________________

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Uarepoo2
Member


Joined: 31 May 2006
Posts: 142

PostPosted: Wed Jul 19, 2006 4:42 am    Post subject: Reply with quote

Doesnt work for me, But i have a completly different mousedown code, So might want to make the tut an actual tut for where to put each part of the code not a copy and paste Razz
Back to top
View user's profile Send private message MSN Messenger
Remedy
Newcomer


Joined: 17 Jul 2006
Posts: 26

PostPosted: Sun Jul 23, 2006 7:29 pm    Post subject: Reply with quote

ergh this is simple as it gets it doesn't even matter if you have a differen't code. If you don't understand this one then I suggest you start studying because the code I made isnt beyond beginners.

- Mate, Remedy.
Back to top
View user's profile Send private message
NexSteve
Sr. Member


Joined: 04 Mar 2006
Posts: 548
Location: Missouri

PostPosted: Mon Jul 24, 2006 9:33 pm    Post subject: Reply with quote

I think the click to and then a attack the just keeps going would be nice.
_________________

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
JFTC
Jr. Member


Joined: 14 May 2006
Posts: 63
Location: The Netherlands, Amsterdam

PostPosted: Sat Sep 16, 2006 11:38 pm    Post subject: Reply with quote

Thanks for this tut.

I've put "Button = 2" after "If Button = 1 Then",
Cause I won't shoot ranged weapons during MapEditor.

Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    Call EditorMouseDown(Button, Shift, x, y)
   
    If frmMapEditor.Visible = False Then
    If Button = 1 Then
            Call PlayerSearch(Button, Shift, x, y)
            XToGo = (x + (NewPlayerX * PIC_X)) / PIC_X
            YToGo = (y + (NewPlayerY * PIC_Y)) / PIC_Y
            Call CheckMapGetItem
        End If
    If Button = 2 Then
            ControlDown = True
            Call CheckAttack
        End If
    End If
End Sub


Thanks,
JFTC.
Back to top
View user's profile Send private message Visit poster's website
pingu
"The Bird"


Joined: 23 Feb 2006
Posts: 3402
Location: Antartica

PostPosted: Sun Sep 17, 2006 8:19 am    Post subject: Reply with quote

I fixed the indention problems and substituted a better variable for the editor check.

I'm just wondering if you really need the "CheckAttack" thing, because I believe it does that in gameloop anyway.

Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    Call EditorMouseDown(Button, Shift, x, y)
   
    If Not InEditor Then
        If Button = 1 Then
            Call PlayerSearch(Button, Shift, x, y)
            XToGo = (x + (NewPlayerX * PIC_X)) / PIC_X
            YToGo = (y + (NewPlayerY * PIC_Y)) / PIC_Y
            Call CheckMapGetItem
        End If
        If Button = 2 Then
            ControlDown = True
            Call CheckAttack
        End If
    End If
End Sub

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
koolgraph
Newcomer


Joined: 29 Jul 2006
Posts: 39

PostPosted: Wed Oct 11, 2006 4:34 am    Post subject: Reply with quote

the fixed sub work if we have the pingu click to move or if we don't have???
Back to top
View user's profile Send private message Visit poster's website
genusis
Newcomer


Joined: 05 Dec 2006
Posts: 3

PostPosted: Fri Dec 08, 2006 10:14 pm    Post subject: Reply with quote

I hate to bring old topics back to life all of a suden but would it be possible to change it so you could also use the right click menu and constianly atk with the moving and pickign up option you us the atk click to atk with the left same as the pick up. do you think somthing liek this would be possible. pingu anyone.
edited: umm like a double click for atk for left key.
Genusis
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Elysium Source Forum Index » Approved Tutorials All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional