Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,888 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 3 of 4 1 2 3 4
Re: free Alien VS Predator radar code [Re: PHeMoX] #62263
10/14/06 13:29
10/14/06 13:29
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
bump..

Does anyone know how to kill the radar after an enemy died? It doesn't ever reach the part when the my entity is gone for some strange reason. It doesn't recognize any 'you' entity, eventhough my enemy's action started the radar code ... should be a valid pointer, right?

Anyways, the radar bitmap freezes when the enemy is removed, anyone?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: free Alien VS Predator radar code [Re: PHeMoX] #62264
10/16/06 07:23
10/16/06 07:23
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Just a guess : Probably the problem is in your
enemy's script, if it is really removed, it should
no longer call the g3_handle_radar().

EDIT
----
Maybe the enemy was removed, then it never
reach to these lines of code :

pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);




Last edited by vlau; 10/16/06 07:35.
Re: free Alien VS Predator radar code [Re: vlau] #62265
10/16/06 15:58
10/16/06 15:58
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Oh...

function g3_handle_radar {
while(!player) { wait(1); }
while(me) {

if(vec_dist(my.x,player.x) < make_scan.z) {
pan_temp = pan_create("bmap = bmp_radar_enemy; flags= visible,refresh,filter;",4);
my.skill92 = handle(pan_temp);
while(vec_dist(my.x,player.x) < make_scan.z) {
[...]
wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
my.skill92 = 0;
}

wait(1);
}
if(my.skill92 != 0) {
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
}

}

Should work.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: free Alien VS Predator radar code [Re: Superku] #62266
10/16/06 19:09
10/16/06 19:09
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Aaargh, this is confusing. You are right, it should work, but it doesn't. I keep having a panel on the radar visible, and it'll simply stop moving, frozen in place.

It must be some sort of pointer problem. I'm only calling the g3_radar code once at the start of the enemy's funktion, off course outside of his while loop.

Edit: The distance to the player is still within the range, doesn't that cause the problem and make it still create a new panel for the radar?

Code:

function g3_handle_radar {
while(!playerrr){wait(1);}
while(me) {
if(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = pan_create("bmap = bmp_radar_enemy; flags = visible,refresh,filter;",101);
my.skill92 = handle(pan_temp);
while(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = ptr_for_handle(my.skill92);
vec_set(temp,playerrr.x);
vec_sub(temp,my.x);
vec_to_angle(my.skill97,temp);
my.skill98 = vec_dist(my.x,playerrr.x); //was camera
pan_temp.scale_x = 0.50-my.skill98/(make_scan.z*2); //1.5
pan_temp.scale_y = pan_temp.scale_x;
pan_temp.pos_x = rader.pos_x+80-my.skill98/(make_scan.z*1.2/100)*sin
//pos_x+96 -> nu 85 , 75
(camera.pan-my.skill97)-16*pan_temp.scale_x;
pan_temp.pos_y = rader.pos_y+70+my.skill98/(make_scan.z*1.2/100)*cos

(camera.pan-my.skill97)-16*pan_temp.scale_x;
//solving bug problem
//
//dots appear at the edges .. fixed ni
//
if(pan_temp.pos_x - rader.pos_x < 25){break;}
if(pan_temp.pos_y - rader.pos_y < 25){break;}
if(pan_temp.pos_x - rader.pos_x > 100){break;}
if(pan_temp.pos_y - rader.pos_y > 100){break;}
//if(me==null){beep; pan_temp.visible = off;break;}

wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
}
my.skill92 = 0;
wait(1);
}
if(my.skill92==0){beep;return;}
wait(1);
}



This doesn't beep when my enemy is dead and removed strangely enough. It should beep, right?

Cheers

Last edited by PHeMoX; 10/16/06 20:23.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: free Alien VS Predator radar code [Re: PHeMoX] #62267
10/17/06 16:33
10/17/06 16:33
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Hm no it should be this I think:
wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
my.skill92 = 0; //panel removed
}

wait(1);
}
if(my.skill92 != 0){ beep;return; } //only beep when panel was not removed
}

Felix


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: free Alien VS Predator radar code [Re: Superku] #62268
10/17/06 16:53
10/17/06 16:53
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Code:
function g3_handle_radar {
while(!playerrr){wait(1);}
while(me) {
if(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = pan_create("bmap = bmp_radar_enemy; flags = visible,refresh,filter;",101);
my.skill92 = handle(pan_temp);
while(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = ptr_for_handle(my.skill92);
vec_set(temp,playerrr.x);
vec_sub(temp,my.x);
vec_to_angle(my.skill97,temp);
my.skill98 = vec_dist(my.x,playerrr.x); //was camera
pan_temp.scale_x = 0.50-my.skill98/(make_scan.z*2); //1.5
pan_temp.scale_y = pan_temp.scale_x;
pan_temp.pos_x = rader.pos_x+80-my.skill98/(make_scan.z*1.2/100)*sin
//pos_x+96 -> nu 85 , 75
(camera.pan-my.skill97)-16*pan_temp.scale_x;
pan_temp.pos_y = rader.pos_y+70+my.skill98/(make_scan.z*1.2/100)*cos

(camera.pan-my.skill97)-16*pan_temp.scale_x;
//solving bug problem
//
//dots appear at the edges .. fixed ni
//
if(pan_temp.pos_x - rader.pos_x < 25){break;}
if(pan_temp.pos_y - rader.pos_y < 25){break;}
if(pan_temp.pos_x - rader.pos_x > 100){break;}
if(pan_temp.pos_y - rader.pos_y > 100){break;}
//if(me==null){beep; pan_temp.visible = off;break;}

wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
my.skill92 = 0;
}
wait(1);
}
if(my.skill92!=0){beep;return;}
//wait(1);
}



This is my code now, still doesn't work, but also doesn't beep

Perhaps this is an engine bug off some sort? Code-wise, this should work, however the radar dot of the enemy keeps freezing in place after I shot him, but there's no beep, eventhough the panel is still 'visible'.

Cheers

Last edited by PHeMoX; 10/17/06 16:59.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: free Alien VS Predator radar code [Re: PHeMoX] #62269
10/17/06 17:17
10/17/06 17:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Here is a workaround (ignore my version of the radar code):

function g3_handle_radar {
my.skill99 = 1;
while(player == null) { wait(1); }
while(me && my.skill99 ) {
if(vec_dist(my.x,player.x) < 3100) {
if(my.hv_team == 1) { pan_temp = pan_create("bmap = bmp_radar_friend; flags = visible,refresh,filter;",4); }
else { pan_temp = pan_create("bmap = bmp_radar_enemy; flags = visible,refresh,filter;",4); }
my.skill92 = handle(pan_temp);
while(vec_dist(my.x,player.x) < 3100 && my.skill99 ) {
pan_temp = ptr_for_handle(my.skill92);
vec_set(temp,player.x);
vec_sub(temp,my.x);
vec_to_angle(my.skill97,temp);
my.skill98 = bmap_width(bmp_radar)/192*vec_dist(my.x,player.x); // because the code was for 192pixel radar
pan_temp.scale_x = 0.85-vec_dist(my.x,player.x)/(4500);
pan_temp.scale_y = pan_temp.scale_x;
pan_temp.pos_x = panel_radar.pos_x+bmap_width(bmp_radar)/2-my.skill98/(36)*sin(player.pan-my.skill97)-16*pan_temp.scale_x;
pan_temp.pos_y = panel_radar.pos_y+bmap_height(bmp_radar)/2+my.skill98/(36)*cos(player.pan-my.skill97)-16*pan_temp.scale_x;
wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
my.skill92 = 0;
}
wait(1);
}
if(my.skill92 != 0) {
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
}
}

and when your enemy dies:

my.skill99 = 0;
wait(1);
ent_remove(me);

Felix


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: free Alien VS Predator radar code [Re: Superku] #62270
10/17/06 18:43
10/17/06 18:43
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
The workaround works great! Thanks man, I owe you one (or two, or three hehehe). Thanks for looking into this for me,

Still, I don't quite understand why your first solution didn't work. A well, a 5 star rating well deserved.

Cheers

Last edited by PHeMoX; 10/17/06 18:44.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: free Alien VS Predator radar code [Re: PHeMoX] #62271
05/16/07 22:39
05/16/07 22:39
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Recently found this thread and this is just what I needed for my tank type game.
Problem is I could not apply the work a round to remove the rader pan indicators.

Is it possible to get more examples or an updated version to the link files please?

Cheers

Re: free Alien VS Predator radar code [Re: Nems] #62272
05/18/07 10:00
05/18/07 10:00
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
What do you need, a fixed radar (circle or rectangle?) that does not rotate with the camera/player?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 3 of 4 1 2 3 4

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | 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