Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 730 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: 21 models avialbel during creation scrreen #5888
07/26/01 05:15
07/26/01 05:15

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



OK this is getting frustrating to me too. I created a empty test level and added:

code:

synonym syn_male_fire_mutant {type entity;}

function male_fire_mutant
{syn_male_fire_mutant = ME;
}

/// functions to spawn the mutant models
function spawn_male_fire
{
temp.x=35;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
create(<guard.mdl>,temp,male_fire_mutant);

}

FUNCTION remove_male_fire () {
//REMOVE syn_male_fire_mutant//this works too
syn_male_fire_mutant.INVISIBLE = ON;

}

ON_1 spawn_male_fire;
ON_2 remove_male_fire;


This works with turning the entity's invisible on or by removing it. This is of course just by hitting the keys and you must be calling it from another function. Refresh me on how you are trying to acheive the on and off functions.


Re: 21 models avialbel during creation scrreen #5889
07/26/01 11:37
07/26/01 11:37

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



kman,

Here is a snippet that might help get you started. The male_mutants (guard.mdl) fade in just after the level loads. Pressing the 2 key (change to your panel button) fades the male_mutants out and fades the female_mutants (cbabe.mdl) in. The 1 key reverses this process. I used the create and remove method instead of the visible and invisible method to save framerate. Maybe you can use this template to add your cyborgs and other races. This has been tested in a empty level with the exception of a position (default camera).

/////////////////////////////////////////////////////////////////
// The MAIN function is called at game start
function main()
{
load_level(<KmanProj.WMB> );
load_status(); // restore global skills
// client_move(); // for a possible multiplayer game
// call further functions here...
WAIT(5);
spawn_male_mutants();// spawn male mutants upon loading
}

SYNONYM syn_male_fire_mutant {type entity;}
SYNONYM syn_male_water_mutant {type entity;}
SYNONYM syn_male_3_mutant {type entity;}
SYNONYM syn_male_4_mutant {type entity;}
SYNONYM syn_male_5_mutant {type entity;}
SYNONYM syn_male_6_mutant {type entity;}
SYNONYM syn_male_7_mutant {type entity;}

SYNONYM syn_female_fire_mutant {type entity;}
SYNONYM syn_female_water_mutant {type entity;}
SYNONYM syn_female_3_mutant {type entity;}
SYNONYM syn_female_4_mutant {type entity;}
SYNONYM syn_female_5_mutant {type entity;}
SYNONYM syn_female_6_mutant {type entity;}
SYNONYM syn_female_7_mutant {type entity;}

// toggle models
FUNCTION m_m_from_f_m () {//male_mutants_from_female_mutants
remove_female_mutants ();
WAITT(10);
spawn_male_mutants ();
}

FUNCTION f_m_from_m_m () {//female_mutants_from_male_mutants
remove_male_mutants ();
WAITT(10);
spawn_female_mutants ();
}

/// MALE MUTANTS
/// functions to spawn the male mutant models
FUNCTION spawn_male_mutants () {
spawn_male_fire_mutant ();
spawn_male_water_mutant ();
spawn_male_3_mutant ();
spawn_male_4_mutant ();
spawn_male_5_mutant ();
spawn_male_6_mutant ();
spawn_male_7_mutant ();
}

FUNCTION spawn_male_fire_mutant{
temp.x=35;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_fire_mutant);

}

function spawn_male_water_mutant{
temp.x=135;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
create(<guard.mdl>,temp,male_water_mutant);
}

FUNCTION spawn_male_3_mutant{
temp.x=235;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_3_mutant);

}

FUNCTION spawn_male_4_mutant{
temp.x=335;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_4_mutant);

}

FUNCTION spawn_male_5_mutant{
temp.x=435;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_5_mutant);

}

FUNCTION spawn_male_6_mutant{
temp.x=535;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_6_mutant);

}

FUNCTION spawn_male_7_mutant{
temp.x=635;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<guard.mdl>,temp,male_7_mutant);

}

/// functions to set synonyms and fade in
FUNCTION male_fire_mutant{
syn_male_fire_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_water_mutant{
syn_male_water_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_3_mutant{
syn_male_3_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_4_mutant{
syn_male_4_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_5_mutant{
syn_male_5_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_6_mutant{
syn_male_6_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION male_7_mutant{
syn_male_7_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}


/// functions to remove the male mutant models
FUNCTION remove_male_mutants () {
remove_male_fire_mutant ();
remove_male_water_mutant ();
remove_male_3_mutant ();
remove_male_4_mutant ();
remove_male_5_mutant ();
remove_male_6_mutant ();
remove_male_7_mutant ();
}

FUNCTION remove_male_fire_mutant () {
syn_male_fire_mutant.TRANSPARENT = ON;
syn_male_fire_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_fire_mutant.ALPHA -= 5*TIME;
IF(syn_male_fire_mutant.ALPHA <=0)
{
REMOVE syn_male_fire_mutant;
//syn_male_fire_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_water_mutant () {
syn_male_water_mutant.TRANSPARENT = ON;
syn_male_water_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_water_mutant.ALPHA -= 5*TIME;
IF(syn_male_water_mutant.ALPHA <=0)
{
REMOVE syn_male_water_mutant;
//syn_male_water_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_3_mutant () {
syn_male_3_mutant.TRANSPARENT = ON;
syn_male_3_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_3_mutant.ALPHA -= 5*TIME;
IF(syn_male_3_mutant.ALPHA <=0)
{
REMOVE syn_male_3_mutant;
//syn_male_3_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_4_mutant () {
syn_male_4_mutant.TRANSPARENT = ON;
syn_male_4_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_4_mutant.ALPHA -= 5*TIME;
IF(syn_male_4_mutant.ALPHA <=0)
{
REMOVE syn_male_4_mutant;
//syn_male_4_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_5_mutant () {
syn_male_5_mutant.TRANSPARENT = ON;
syn_male_5_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_5_mutant.ALPHA -= 5*TIME;
IF(syn_male_5_mutant.ALPHA <=0)
{
REMOVE syn_male_5_mutant;
//syn_male_5_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_6_mutant () {
syn_male_6_mutant.TRANSPARENT = ON;
syn_male_6_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_6_mutant.ALPHA -= 5*TIME;
IF(syn_male_6_mutant.ALPHA <=0)
{
REMOVE syn_male_6_mutant;
//syn_male_6_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_male_7_mutant () {
syn_male_7_mutant.TRANSPARENT = ON;
syn_male_7_mutant.ALPHA = 100;
WHILE(1)
{
syn_male_7_mutant.ALPHA -= 5*TIME;
IF(syn_male_7_mutant.ALPHA <=0)
{
REMOVE syn_male_7_mutant;
//syn_male_7_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

/// FEMALE MUTANTS
/// functions to spawn the female mutant models
FUNCTION spawn_female_mutants () {
spawn_female_fire_mutant ();
spawn_female_water_mutant ();
spawn_female_3_mutant ();
spawn_female_4_mutant ();
spawn_female_5_mutant ();
spawn_female_6_mutant ();
spawn_female_7_mutant ();
}

FUNCTION spawn_female_fire_mutant{
temp.x=35;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_fire_mutant);

}

function spawn_female_water_mutant{
temp.x=135;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
create(<cbabe.mdl>,temp,female_water_mutant);
}

FUNCTION spawn_female_3_mutant{
temp.x=235;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_3_mutant);

}

FUNCTION spawn_female_4_mutant{
temp.x=335;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_4_mutant);

}

FUNCTION spawn_female_5_mutant{
temp.x=435;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_5_mutant);

}

FUNCTION spawn_female_6_mutant{
temp.x=535;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_6_mutant);

}

FUNCTION spawn_female_7_mutant{
temp.x=635;
temp.y=355;
temp.z=275;
vec_for_screen(temp,camera);
CREATE(<cbabe.mdl>,temp,female_7_mutant);

}

/// functions to set synonyms and fade in
FUNCTION female_fire_mutant{
syn_female_fire_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_water_mutant{
syn_female_water_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_3_mutant{
syn_female_3_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_4_mutant{
syn_female_4_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_5_mutant{
syn_female_5_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_6_mutant{
syn_female_6_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}

FUNCTION female_7_mutant{
syn_female_7_mutant = ME;
MY.TRANSPARENT = ON;
MY.ALPHA = 0;
WHILE(1)
{
MY.ALPHA += 5*TIME;
IF(MY.ALPHA >=100)
{
MY.TRANSPARENT = OFF;
RETURN;
}
WAIT(1);
}
}


/// functions to remove the female mutant models
FUNCTION remove_female_mutants () {
remove_female_fire_mutant ();
remove_female_water_mutant ();
remove_female_3_mutant ();
remove_female_4_mutant ();
remove_female_5_mutant ();
remove_female_6_mutant ();
remove_female_7_mutant ();
}

FUNCTION remove_female_fire_mutant () {
syn_female_fire_mutant.TRANSPARENT = ON;
syn_female_fire_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_fire_mutant.ALPHA -= 5*TIME;
IF(syn_female_fire_mutant.ALPHA <=0)
{
REMOVE syn_female_fire_mutant;
//syn_female_fire_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_water_mutant () {
syn_female_water_mutant.TRANSPARENT = ON;
syn_female_water_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_water_mutant.ALPHA -= 5*TIME;
IF(syn_female_water_mutant.ALPHA <=0)
{
REMOVE syn_female_water_mutant;
//syn_female_water_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_3_mutant () {
syn_female_3_mutant.TRANSPARENT = ON;
syn_female_3_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_3_mutant.ALPHA -= 5*TIME;
IF(syn_female_3_mutant.ALPHA <=0)
{
REMOVE syn_female_3_mutant;
//syn_female_3_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_4_mutant () {
syn_female_4_mutant.TRANSPARENT = ON;
syn_female_4_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_4_mutant.ALPHA -= 5*TIME;
IF(syn_female_4_mutant.ALPHA <=0)
{
REMOVE syn_female_4_mutant;
//syn_female_4_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_5_mutant () {
syn_female_5_mutant.TRANSPARENT = ON;
syn_female_5_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_5_mutant.ALPHA -= 5*TIME;
IF(syn_female_5_mutant.ALPHA <=0)
{
REMOVE syn_female_5_mutant;
//syn_female_5_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_6_mutant () {
syn_female_6_mutant.TRANSPARENT = ON;
syn_female_6_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_6_mutant.ALPHA -= 5*TIME;
IF(syn_female_6_mutant.ALPHA <=0)
{
REMOVE syn_female_6_mutant;
//syn_female_6_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

FUNCTION remove_female_7_mutant () {
syn_female_7_mutant.TRANSPARENT = ON;
syn_female_7_mutant.ALPHA = 100;
WHILE(1)
{
syn_female_7_mutant.ALPHA -= 5*TIME;
IF(syn_female_7_mutant.ALPHA <=0)
{
REMOVE syn_female_7_mutant;
//syn_female_7_mutant.INVISIBLE = ON;
RETURN;
}
WAIT(1);
}
}

/////////////////////////////////////////////////////
ON_1 m_m_from_f_m;
ON_2 f_m_from_m_m;

///////////////////////////////////
EDIT:
Oops, I forgot to put this in the code format. Actually it is easier to copy and paste this way.

Good luck


Re: 21 models avialbel during creation scrreen #5890
07/26/01 22:55
07/26/01 22:55

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



okay i will try this, I am calling the function to turn the models on and off from another function that is called by pressing the race and/or the male/female button.

Re: 21 models avialbel during creation scrreen #5891
07/27/01 00:14
07/27/01 00:14

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



hey keebo This is still causing me the empty synonym errors.I dont understand why but it is.

Re: 21 models avialbel during creation scrreen #5892
07/27/01 07:33
07/27/01 07:33

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



It works fine for me without any errors. Something in your code appears to be calling one of the functions before the synonym is set. When does this occur? Does it occur every time? Any other info would be helpful.

I would start a empty test level with only a position for the view, add this code and make sure it works on your system. It should work OK but if it does not then something is wrong with your setup. If it works OK, start by assigning the ON_1 and ON_2 functions to simple panel buttons. Continue adding your other code until an error occurs. Then you will know where the problem starts.


Re: 21 models avialbel during creation scrreen #5893
07/29/01 09:35
07/29/01 09:35

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



okay i got it to work like you suggested. this will make me go through my orignal code and make it more efficient too. I am having one problem still.

when the creation screens frist comes up. the male models are there weeeeee. the problem is this ---

if you click on the male button(male models are already displayed , synonyms are set.)frist. because the synonyms are set to male but the females synonyms are not set i am getting empty synonym error, now the only way I see to get around this is go ahead and create one set of females but make them invisible.

ooh i just realized something, if the females models are displayed and i click on the female button the empty synonym error will also occur.
ummm how would i get around this issue??? here is my function that turns on the male mutants.
FUNCTION turnon_models () {//male_mutants_from_female_mutants
{
if (gender_selected==1) // will need to check for the race
{
spawn_male_mutants ();
wait(1);
remove_female_mutants();
wait (1);
}
else { if (gender_selected==2) // will need to check for the race
{remove_male_mutants();
wait(1);
spawn_female_mutants ();
wait(1);
}
}
return;
}

to recap what the problem is if you click on the gender button of the current gender displayed then you will get the empty synonym error.

How do i get around this, maybe with a while???


Re: 21 models avialbel during creation scrreen #5894
07/30/01 06:49
07/30/01 06:49

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I noticed the error while I was testing the code too. I was thinking about checking a variable for which set of models was displayed and only change models if the value didn't equal the displayed models' value. But since you are using panel buttons, I would deactivate the button upon spawning so the user could not respawn them again causing an error.

Re: 21 models avialbel during creation scrreen #5895
07/30/01 21:17
07/30/01 21:17

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



yea i could only have button shown, or just a variable that would be set

Page 3 of 3 1 2 3

Moderated by  HeelX, Spirit 

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