Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
radar question #129692
05/13/07 19:00
05/13/07 19:00
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
just wondering, i know it is possible to have a radar bmap which shows the whole level, is it also possible to be able to click on that map so you would go to were you clicked? thanks in advance.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: radar question [Re: jigalypuff] #129693
05/13/07 19:05
05/13/07 19:05
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
you have to use second view then place it by function on screen were you want to. camera should be ofcourse haigh above and looking straight down.
You may use Noparticle = on; noshadow = on; etc. to improve framerate and looking
about click and go...

hmmm... change main camera pos to clicked position?
maybe trace from second camera to mouse pos on the ground and then go there?
Just suggestion

Last edited by tompo; 05/13/07 19:09.
Re: radar question [Re: tompo] #129694
05/13/07 20:00
05/13/07 20:00
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
well i have an isometric camera already and am trying to use the rader code from the aums, but am getting sedloads of errors, i think it may be old syntax so i`ll have to keep fiddeling with it.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: radar question [Re: jigalypuff] #129695
05/13/07 20:42
05/13/07 20:42
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Code:
////////////////////////////////////////////////////
function set_pos();
bmap temp_map = <black.tga>;
////////////////////////////////////////////////////
view radar_view
{
layer = 1;
size_x = 320;
size_y = 240;
flags = visible;
}
panel radar_pan
{
bmap = temp_map;
flags = transparent,visible;
alpha = 0; // Invisible
on_click = set_pos;
}
////////////////////////////////////////////////////
function set_pos()
{
temp.x = mouse_pos.x - radar_pan.pos_x;
temp.y = mouse_pos.y - radar_pan.pos_y;
temp.z = 0;

vec_set(target,temp);
target.z = mouse_range;

vec_for_screen(temp,radar_view);
vec_for_screen(target,radar_view);

c_trace(temp,target,ignore_passable + ignore_models);

if(vec_dist(target,nullvector) > 0)
{
vec_set(camera.x,target);
}
}
////////////////////////////////////////////////////
function init_radar()
{
radar_view.z = 1000;
radar_view.tilt = -90;
radar_pan.size_x = radar_view.size_x;
radar_pan.size_y = radar_view.size_y;
}
////////////////////////////////////////////////////


Remember to call function init_radar
Hope that's what you need

The bmap used could be any bmap - it would not be visible anyways.

Re: radar question [Re: Claus_N] #129696
05/13/07 22:17
05/13/07 22:17
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
well the code works and it`s very close to what i`m after, but the map view don`t appear to be a view of the level,

the effect i want is more like this one

that panel pops up when i click on the helmsman, if thats the rader then i can click on were on the map i want the ship to go, and if possible to use different icons for my ship and enemy ships. i don`t have a block around the level though, is this why the view is not of the level?


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: radar question [Re: jigalypuff] #129697
05/14/07 07:14
05/14/07 07:14
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
You can set x, y, z, pan, tilt and roll of the view, just like camera ("camera" is also just a view).
You can set pos_x and pos_y to place it where you want on the screen, and size_x and size_y to set the size. The panel, radar_pan, should just cover the view - it is the panel that you click on, as a view does not have an on_click event.

If there is no geometry in the level, the set-player-to-clicked-position code would not work, as it uses a trace.

And the "vec_set(camera.x,target);" after the trace should be "vec_set(player.x,target);".


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1