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
1 registered members (TipmyPip), 18,619 guests, and 5 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
Questions about war.wdl #11523
01/14/03 06:19
01/14/03 06:19
Joined: Aug 2002
Posts: 572
Toronto
MadMark Offline OP
User
MadMark  Offline OP
User

Joined: Aug 2002
Posts: 572
Toronto
I am trying to adapt the WEAPONS.WDL and WAR.WDL for use without trace/shoot. All of my shooting will be done with models and impact detection.

So far, I haven't been able to harm them. What do I need to change to get damage to register on an impact event?

Becuase I want to differentiate between NPC fire and player fire, I use skill29 to hold a number representing object type.

Object_types:
11 = player rocket
12 = player laser
21 = enemy rocket
22 = enemy laser

So I have the following in the AI's action:
code:
// Test robot, 
//uses object_type
ACTION robot_test
{
test_actor = ME;
MY._FORCE = 2;
my._FIREMODE = DAMAGE_IMPACT+FIRE_ROCKET+HIT_FLASH+0.05;
my._HITMODE = HIT_GIB + HIT_EXPLO;
MY._WALKSOUND = _SOUND_ROBOT;
my._I_ACCURACY = 1;
my._I_COWARDICE = 30;
my._I_ALERTNESS = 1000;
my.fat = off;
my.narrow = on;
my.enable_scan = on;
my.enable_detect = on;
my.enable_impact = on;
my.enable_entity = on;
my.enable_push = on;
my.object_type = 20;
my.skill30 = 20 * time;
my._WALKSWIM_DIST = 1;
my._RUNCRAWL_DIST = 1;
my._STANDJUMP_TIME = 1;
my._ATTACKDUCK_TIME = 1;
my._RUNTHRESHOLD = 30;
my._HEALTH = 100;
my._ARMOR = 100;
my._ALERTNESS = 1000;
my._ACCURACY = 1;
my._COWARDICE = 30;
my._MUZZLEATTACH = 1;

if (event_type == event_impact) && (you.object_type == 11) || (you.object_type == 12)
{
my._HEALTH -= 20;
msg.string = "HIT!"; // for debug.
show_message();

}
if(my._HEALTH <= 0) // no health? Die
{
exclusive_entity;
wait(1);
state_die();
return;
}
// Note: changed, negative cowardice means never retreat
if(my._HEALTH <= my._I_COWARDICE && my._I_COWARDICE >= 0) // low health? Escape
{
exclusive_entity;
wait(1);
state_escape();
return;
}

actor_fight();
}

Mark


People who live in glass houses shouldn't vacuum naked.
Re: Questions about war.wdl #11524
01/14/03 06:46
01/14/03 06:46

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Sorry I don't use either of these template scripts but when my player gets hit... Im using my.enable_impact=on; my.event=health_stats;

health_stats()
{
remove health here and what to do next;
}

I noticed you have if event_type==event_impact...Im not sure this will work unless its in a seperate function... like
health_stats()
{
if(event_type==event_impact)
{
blah...blah;
}
}

Re: Questions about war.wdl #11525
01/15/03 00:45
01/15/03 00:45
Joined: Aug 2002
Posts: 572
Toronto
MadMark Offline OP
User
MadMark  Offline OP
User

Joined: Aug 2002
Posts: 572
Toronto
Thanks, I think it is time AGAIN to tidy up my code. I will be combining a bunch of similar elements (the player can shoot a rocket and impact an asteroid and get points no problem) and see what I can break/fix. [Big Grin]

By the way, ever see an NPC player moved with the ent_move command lose _health just by moving? LOL I can't hurt them by shooting them, but if I let 'em move around, they die on their own!

Thanks again!
Mark


People who live in glass houses shouldn't vacuum naked.
Re: Questions about war.wdl #11526
01/15/03 05:09
01/15/03 05:09

A
Anonymous
Unregistered
Anonymous
Unregistered
A



I'd probably need to see the code...but no, ent_move should only move an entity...


Moderated by  HeelX, Spirit 

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