Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 609 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Doom3 _like_Enemy Supriser #85165
08/08/06 17:23
08/08/06 17:23
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline OP
User
TeutonicDarkness  Offline OP
User

Joined: Mar 2005
Posts: 725
USA
Hello,


Just thought I would share my latest script
it Spawns an Enemy at defined place...
(similar to how Doom3 spawn enemies behind)
It works nicely at the exit of Level or a door
setting the trigger in front of you and the Spawn point behind...

Let the enemies convince the player he isnt quite ready
to leave the level.


This was designed to work with the A5 templates
but should work with A6 as well with minor modification
( Would have to chanded the spawnee action for sure)
also a Enemy action is included ( A5 template only)



Ok here is the code:


Code:

////////////////////////////

var spawnpos[3];

string enemy_sneak1, <guard.mdl>; // your spawned models here
var enemy1;

//entity* spawn_point;






ACTION S_point // give this to the spawn point

{
spawnpos[0] = my.skill1; // copy a dummy model to where you would like
spawnpos[1] = my.skill2; // enemy to spawn
spawnpos[2] = my.skill3; // copy its positon to these skill in WED
wait(1);
}



action sneaky1
{
wait(1);
enemy1 = me;
my._health =1500;
//MY._ALERTNESS = 3000;
temp.z = 1000; // scanning range
MY._ACCURACY = -100;
MY._COWARDICE =-300;
MY._FORCE = 2;
//MY._FIREMODE = DAMAGE_SHOOT+FIRE_BALL+HIT_FLASH+0.10;
//MY._FIREMODE = DAMAGE_EXPLODE+FIRE_BALL+HIT_EXPLO+BULLET_SMOKETRAIL+0.20;
MY._FIREMODE = DAMAGE_EXPLODE+FIRE_BALL+HIT_EXPLO+BULLET_SMOKETRAIL+0.20;
MY._HITMODE = HIT_GIB;//HIT_EXPLO;
MY._WALKSOUND = _SOUND_ROBOT;
anim_init();
drop_shadow(); // attach shadow to robot
actor_fight();


// if(MY.FLAG4 == ON) { patrol(); }
// create(<arrow.pcx>,MY.POS,_ROBOT_TEST_WATCHER); // used to activate watcher drone
}




function en_spawn()
{
wait(1);
ent_create (enemy_sneak1,spawnpos,sneaky1);
//here the define enemy is spawne, cordiantes set, action give
}






function spawn_check()
{
wait(3); // add 2 spawned enemies if desired have to leave time to spawn
if(event_type == event_impact && you == player)
{

my.enable_impact = OFF;
my.enable_push = off;
en_spawn();

}

}


action Enemy_Spawner1 // here is the Action to give the trigger point

{

wait(1);
exclusive_global;
MY.ENABLE_IMPACT = ON; //enables player impact
my.enable_push = on;

MY.EVENT = spawn_check;

}
////////////////////////////////
//////////////////////////////////////////



Re: Doom3 _like_Enemy Supriser [Re: TeutonicDarkness] #85166
08/08/06 20:09
08/08/06 20:09
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Nice contribution TeutonicDarkness !!
I could come in handy for my ^^

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Doom3 _like_Enemy Supriser [Re: frazzle] #85167
08/08/06 20:17
08/08/06 20:17
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline OP
User
TeutonicDarkness  Offline OP
User

Joined: Mar 2005
Posts: 725
USA
Thanks frazzle,



If you have any trouble with it just let me know...

though it is commented and pretty staraight forward
and simple..


*** Teutonic Darkness ***

Re: Doom3 _like_Enemy Supriser [Re: TeutonicDarkness] #85168
08/09/06 10:04
08/09/06 10:04
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
I just implanted into a test level and it works great !!
Again, nice code contribution TeutonicDarkness ^^


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Doom3 _like_Enemy Supriser [Re: frazzle] #85169
11/18/06 16:34
11/18/06 16:34
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline OP
User
TeutonicDarkness  Offline OP
User

Joined: Mar 2005
Posts: 725
USA
Hey,


Just wanted to add that if anyones using Perfect AI (AUM 31)
If you place enemy as the action instead of sneaky1
it works quite nicely...

Untested on latest A6 version will do so when
I have the time


Just discovered accidently....
Sure makes it easier for me to dynamically create those
"perfect AI enemies" rather than rebuilding new paths
when I want to add more.

Now maybe I'll see If I can come up with some
special breed "perfect AI enemies"
that use the same original path set....



*** Teutonic Darkness ***

Re: Doom3 _like_Enemy Supriser [Re: TeutonicDarkness] #85170
11/22/06 18:59
11/22/06 18:59
Joined: Oct 2006
Posts: 26
SMichael Offline
Newbie
SMichael  Offline
Newbie

Joined: Oct 2006
Posts: 26
If you replace this in your code, you have the definitions in WED under
object properties -> behaviour:

Code:
//entity* spawn_point;


define _spawn_X,SKILL1; // X Pos of spawnpoint
define _spawn_Y,SKILL2; // Y Pos of spawnpoint
define _spawn_Z,SKILL3; // Z Pos of spawnpoint



// uses: _spawn_X, _spawn_Y, _spawn_Z
ACTION S_point // give this to the spawn point

{
spawnpos[0] = my._spawn_X; // copy a dummy model to where you would like
spawnpos[1] = my._spawn_Y; // enemy to spawn
spawnpos[2] = my._spawn_Z; // copy its positon to these skill in WED
wait(1);
}



Greatings from Berlin
Michael

Re: Doom3 _like_Enemy Supriser [Re: SMichael] #85171
11/22/06 19:17
11/22/06 19:17
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline OP
User
TeutonicDarkness  Offline OP
User

Joined: Mar 2005
Posts: 725
USA
Quote:

If you replace this in your code, you have the definitions in WED under
object properties -> behaviour:

Code:
//entity* spawn_point;


define _spawn_X,SKILL1; // X Pos of spawnpoint
define _spawn_Y,SKILL2; // Y Pos of spawnpoint
define _spawn_Z,SKILL3; // Z Pos of spawnpoint



// uses: _spawn_X, _spawn_Y, _spawn_Z
ACTION S_point // give this to the spawn point

{
spawnpos[0] = my._spawn_X; // copy a dummy model to where you would like
spawnpos[1] = my._spawn_Y; // enemy to spawn
spawnpos[2] = my._spawn_Z; // copy its positon to these skill in WED
wait(1);
}



Greatings from Berlin
Michael





Yes I had that in my updated code but forgot to post here...
good catch.. Thanks,


*** Teutonic Darkness ***


Moderated by  adoado, checkbutton, mk_1, Perro 

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