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 (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
metal flag #86582
08/17/06 20:05
08/17/06 20:05
Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
anonymous_alcoho Offline OP
Senior Developer
anonymous_alcoho  Offline OP
Senior Developer

Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
I have a host of tanks for my RTS. Their metal flags have been switched on, but only one tank, and only its body, applies the metal flag. This is the code:

Code:

action AmerTankTurret
{
my.metal = on;
my.enable_click = on; //enable click
my.event = selectMe; //select unit if he is clicked
while(you.health > 0)
{
if(my.selected == on) { you.selected == on; }
if(you.selected == on) { my.selected == on; }
my.x = you.x;
my.y = you.y;
my.z = you.z;
if(you.mode != 3)
{
my.pan = you.pan;
}
wait(1);
}
}

action AmerTank //controls USA 5 tanks, FT-17, Sherman, Patton, Abrams and MacArthur
{
my.metal = on;
my.health = 250 + amerTankBonus;
my.enable_click = on; //enable click
my.event = selectMe; //select unit if he is clicked
my.team = 1; //team is set to 1, these are the player's units
my.type = 2; //is a vehicle
my.mode = 0; //moving or no?
my.pan = ang(my.pan); //set rotation to -180 . . . +180 range
my.selected = off;
if(curEra == ww1) { ent_create(ftTurret,my.x,AmerTankTurret); }
if(curEra == ww2) { ent_create(shermTurret,my.x,AmerTankTurret); }
if(curEra == viet) { ent_create(patTurret,my.x,AmerTankTurret); }
if(curEra == mod) { ent_create(m1Turret,my.x,AmerTankTurret); }
if(curEra == maakra) { ent_create(macTurret,my.x,AmerTankTurret); }
while(my.health > 0)
{
if(my.selected == on) //if selected
{
if(my.selecter != 1) //if doesn't have selection ring
{
ent_create(selectBMP,my.x,selectSprite); //create it
my.selecter = 1; //set selecter to one
}
if(unselect == 1)
{
my.selected = off; //deselect if something else is clicked on
}
if(mouse_right) //if rightclicked while selected
{
mouse_trace(); //find coordinate
vec_set(my.targX,target); //set to unit's targets
my.mode = 1; //set him to move
}
}
if(my.mode == 1)
{
vec_set(temp,my.targX);
vec_diff(temp,temp,my.x);
vec_to_angle(my.angAtt,temp);
my.angAtt = ang(my.angAtt);
//while(my.
if((my.tilt < 0) || (my.tilt > 0)) { my.tilt = 0; }
if((my.roll < 0) || (my.roll > 0)) { my.roll = 0; }
my.skill22 = 5 * time;
my.skill23 = 0;
my.skill24 = 0;//-2.5;
move_mode = ignore_passable + ignore_sprites + glide;
ent_move(my.skill22,nullvector);
if(vec_dist(my.x,my.targX) <= 60) { my.mode = 0; breakpoint; }
}
wait(1);
}
//run death animation, make passable and remove
ent_remove(me);
}



Other than the metal flag, the code works so far, although it is still in developement. Since the tank has no skin (i need to buy ultimate unrap), metal would make the tank easier to see.


"Oh no, it's true! I'm a love magnet!" Calvin from Calvin and Hobbes My name's Anonymous_Alcoholic.
Re: metal flag [Re: anonymous_alcoho] #86583
08/17/06 20:27
08/17/06 20:27
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Quote:

Since the tank has no skin...




So you don“t have a mapping and a texture loaded? This could be the problem, I think. Try to make a cheap MDL - mapping (e.g. only one colour and a mapping from the bottom) as test.


no science involved
Re: metal flag [Re: fogman] #86584
08/17/06 20:59
08/17/06 20:59
Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
anonymous_alcoho Offline OP
Senior Developer
anonymous_alcoho  Offline OP
Senior Developer

Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
well, technically it has the black skin that MED applies to everything.

I recompiled the level and changed the level_load code somewhat so a wait(5) follows the level_load command. Now all the bodies have a metal flag, but none of the turrets do, even though it is set in the first line of the action.

EDIT: I applied metal to the turret of a nearby panzer (to be used as target practise) and all the metal flags except the body of one tank turned off. I also did a quick front map of each model, and left them black. No change. Only one model has metal turned on, which is dumb b/c the other three tanks have the same exact actions applied.

Last edited by anonymous_alcoho; 08/17/06 21:17.

"Oh no, it's true! I'm a love magnet!" Calvin from Calvin and Hobbes My name's Anonymous_Alcoholic.
Re: metal flag [Re: anonymous_alcoho] #86585
08/20/06 20:04
08/20/06 20:04
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
Never used ultimate unwrap but before spending money on it you might want to look into blender. It has some very good uv tools and is free. Look for a few video tutorials by graybeard I beleive is the contributor Really helped me in unwrapping complex models. Just a suggestion. Sorry not sure about the problem tho.


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.

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