Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
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
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 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
Mini map #369073
05/01/11 11:40
05/01/11 11:40
Joined: Apr 2011
Posts: 75
Malta
E
Ercoles Offline OP
Junior Member
Ercoles  Offline OP
Junior Member
E

Joined: Apr 2011
Posts: 75
Malta
Can someone give an example how to make a mini map of the area.
Using this code I got a small map of the area but could not control it. Further more I would like it to look from above

VIEW* area_map =
{
layer = 7;
pos_x = 10;
pos_y = 500;
size_x = 200;
size_y = 200;
arc = 60;
aspect = 1;
ambient = 10;
fog = 10;
genius = NULL;
flags = NOSKY | SHOW;
}

Re: Mini map [Re: Ercoles] #369074
05/01/11 11:50
05/01/11 11:50
Joined: Nov 2008
Posts: 946
T
the_clown Offline
User
the_clown  Offline
User
T

Joined: Nov 2008
Posts: 946
Code:
VIEW* area_map =
{
layer = 7;
pos_x = 10;
pos_y = 500;
size_x = 200;
size_y = 200;
arc = 60;
aspect = 1;
ambient = 10;
fog = 10;
genius = NULL;
flags = NOSKY | SHOW;
} 

var mapHeight = 1000; // change this to control the height of the mini map

function showMiniMap()
{
  while(1)
  {
    area_map.x = player.x;
    area_map.y = player.y;
    area_map.z = player.z + mapHeight;
    area_map.tilt = -90;
    wait(1);
   }
}



This should do the trick, just call showMiniMap from the main function and play with mapHeight. I'm assuming you wanna keep the map above the player entity, if this is not the case you have to replace "player" with the pointer of the entity you wanna keep track of.

Re: Mini map [Re: the_clown] #369618
05/05/11 16:32
05/05/11 16:32
Joined: Jan 2011
Posts: 65
R
reknak Offline
Junior Member
reknak  Offline
Junior Member
R

Joined: Jan 2011
Posts: 65
I don't want to hijack the thread, but I get an error when I used that script the_clown. It says 'script crash in showMiniMap: sys', Error E1513. How do you fix this? Thanks in advance!

Re: Mini map [Re: reknak] #369619
05/05/11 16:41
05/05/11 16:41
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Try it like this:
Code:
function showMiniMap()
{
  while(!player){wait(1);}
  while(1)
  {
    area_map.x = player.x;
    area_map.y = player.y;
    area_map.z = player.z + mapHeight;
    area_map.tilt = -90;
    wait(1);
   }
}

You need to be sure, that you entity you track on, is already created.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Mini map [Re: 3run] #369621
05/05/11 17:00
05/05/11 17:00
Joined: Jan 2011
Posts: 65
R
reknak Offline
Junior Member
reknak  Offline
Junior Member
R

Joined: Jan 2011
Posts: 65
Thanks, that worked!


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