Sign in to follow this  
Followers 0
qazwsx

Script a game

4 posts in this topic

I am trying to script a game (desktop tower defense) and i was wondering how i could script it so that it would work regardless of screen position, for example having the user click in the top left of the game area, but not all people will click in the same place, does anyone have any ideas to solve this problem?

Share this post


Link to post
Share on other sites



just do a pixel search for whatever would pop for the word "Score" in the top left part of the game. Now you can relate all of your coordinates to this position.

Share this post


Link to post
Share on other sites

GUICoordMode Alters the position of a control defined by <a href="GUICtrlSetPos.htm">GUICtrlSetPos.

1 = absolute coordinates (default) still relative to the dialog box.

0 = relative position to the start of the last control (upper left corner).

2 = cell positionining relative to current cell. A -1 for left or top parameter don't increment the start.

So next line is -1,offset; next cell is offset,-1; current cell is -1,-1.

Obviously "offset" cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

alright ill try that thx guys

Edit: how would i make the cordinates relative to the position of "score." Vaulater i don't quite get wat your saying, wouldn't that require a gui control?

Edited by sccrstvn93

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0