1 registered members (AndrewAMD),
559
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Isometric controls+camera RTS/RPG The Sims
[Re: Orange Brat]
#30934
10/03/05 22:19
10/03/05 22:19
|
Joined: Nov 2000
Posts: 1,534 hamburg
Samb
Serious User
|
Serious User
Joined: Nov 2000
Posts: 1,534
hamburg
|
yep thats very usefull brat and no the rotage hasnt snapping and you must press the middle mouse key to rotate (I change thatbecause I havent a middle mouse key ^^) new function added you have the choice I you want to make the unused level transparent or invisible
|
|
|
Re: Isometric controls+camera RTS/RPG The Sims
[Re: Kotakide]
#30936
02/16/06 16:17
02/16/06 16:17
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
Serious User
|
Serious User
Joined: Nov 2005
Posts: 1,007
|
how would i go about useing the left mouse button to rotate the map? i would like to use this in conjuction with a popup menu but i need the right mouse button for that. sweet bit of code btw, i shall find untold uses for this.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: Isometric controls+camera RTS/RPG The Sims
[Re: jigalypuff]
#30937
02/16/06 17:01
02/16/06 17:01
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2000
Posts: 7,490
|
In the cam.wdl is where the camera panning is handled: Code:
if(mouse_right == 1 || key_pressed(tl_key_scancode) || key_pressed(tr_key_scancode) || key_pressed(ldown_key_scancode) || key_pressed(lup_key_scancode)) { orbit_camera_pan -= (mouse_force.x * mouse_sensitivity * mouse_invert_pan) - ((key_pressed(tr_key_scancode) - key_pressed(tl_key_scancode)) * mouse_sensitivity * mouse_invert_pan * time); orbit_camera_pan = orbit_camera_pan%360; //limit to 360 degrees
orbit_camera_tilt -= (mouse_force.y * mouse_sensitivity * mouse_invert_tilt) - ((key_pressed(ldown_key_scancode) - key_pressed(lup_key_scancode)) * mouse_sensitivity * mouse_invert_tilt * time); orbit_camera_tilt = clamp(orbit_camera_tilt, orbit_min_tilt, orbit_max_tilt); //limit }
There are some checks in other parts of the system that check whether mouse_right and mouse_left are pressed or not. You'll have to change those if you change the above mouse_right to mouse_left. I'm guessing you'll have to switch all the rights to lefts and vice versa.
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: Isometric controls+camera RTS/RPG The Sims
[Re: Orange Brat]
#30938
02/18/06 12:43
02/18/06 12:43
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
Serious User
|
Serious User
Joined: Nov 2005
Posts: 1,007
|
cheers mate, i got that to work, now i have run into another problem, i have a gui which will launch your code, it goes fine up until i hit the new game button, then i get a can`t find hero action error, i have deleted all the blocks from the wmb bar the grid one and the camera one, any thoughts on this please?
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: Isometric controls+camera RTS/RPG The Sims
[Re: jigalypuff]
#30939
02/19/06 15:45
02/19/06 15:45
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
Serious User
|
Serious User
Joined: Nov 2005
Posts: 1,007
|
it`s ok i got it to work, i forgot to include the scripts into the main wdl, now all i need ot figure is a random star generator, and how a turn funvction works lmao, thanks again for this code.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
|