assanination Tutorial - questions???

Post your scripting questions / solutions here

Moderator: Moderators

Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

assanination Tutorial - questions???

Post by Shifty »

After Reading the assanination Tutorial I just have a few questions -

Would it be possible to make it so that you as a team are the guards to this (target) and have to escort him to safety (for argument sake say a plane, whereas the other team have to kill him) - I suppose you would have to put a trigger around the plane, so that when the guy passes through the trigger the objective is complete - Or am I talking rubbish - So I guess what i'm asking is how do I get the guy to follow some1
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Is this for a multiplayer map, if so I can't help fully.

Well you could add an ai character with a name of 'friendly', and a '#fnum' key of '1'.

Then put 'setthread team1_wins' as the target field of a trigger.

Then in your script add this to the relavent parts:

------------------------------------------------------------------

main:
exec global/ai.scr
exec global/friendly.scr

level waittill spawn

thread target_man
end

target_man:

level.friendly1 thread global/friendly.scr::friendlythink
level.friendly1.friendtype = 1
level.friendly1.distance = 128

thread target_dead
end

target_dead:
if(IsAlive $friendly)
$friendly waittill death
thread team2_wins
end

team1_wins:
//MULTIPLAYER WIN CODE - TEAM1
end

team2_wins:
//MULTIPLAYER WIN CODE - TEAM2
end

------------------------------------------------------------------

If its a single player map, just replace the 'team2_wins' bit with the usual mission complete stuff, or objective complete.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I'm afraid that's not going to work. It's meant to follow the player, whereas in a multiplayer map there is more than one player.

This is much more complicated than you would think at first thought, which is because Mohaa's scripting language (morpheus) was designed for single player games only. The multiplayer part is fairly difficult to script and the available commands don't suffice. That's an annoying problem I ran into when working on my bot stuff.

However, I know a way around it which concerns using triggers on every spawn position to detect new players entering the battle. I know it's a sloppy way but I don't know a better :?. Whenever you've got this working well, the follow code is easy.

Maybe study global/jv_mp_ai.scr that comes with my bot beta map? Do a search for the thread 'action_follow', that's all you need for an AI to follow someone.
Image
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

hmm

Post by Shifty »

I'll take a look through that script then

would it be possible for the the AI to follow the 1st Allied Player that gets to him?

But then if the person escorting him dies would it be possible for a new player to escort him?

It all sounds very hard to do but ill keep pluging away at it
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Shifty- will you be giving the AI a fairly high health? Just curious as one lucky or well placed shot would end the round very quickly... at first thought it seems as though it could be a much easier time for the attackers than the defenders...

Second thought, and JV can probably address this, but do you need to put in a ton of path nodes so that the AI can take cover for themselves, etc... and IF so, how many escape routes are there? Seems more than one is best to vary play.

VERY COOL idea, I like it and think it could be a great variation for MP maps! Good luck with it!
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Yup

Post by Shifty »

His health would have to equal that of Superman

I'm thinking of putting a plane somewhere for the guy to be escorted to - of course there would be many different ways for you to get there[/i]
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Maybe you can try to give the officer a key of "health" and value of "whatever number".
Live to map, not map to live.
-mohaa_rox, .map
moderator
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

"His health would have to equal that of Superman"

Or a medic, look the "t2l3_medic" script file for the Belgium forest map in Spearhead (bastogne - correct spelling?) !

$medic immune suicide
$medic immune crush
$medic immune crush_every_frame
$medic immune telefrag
$medic immune lava
$medic immune slime
$medic immune falling
$medic immune last_self_inflicted
$medic immune explosion
$medic immune explodewall
$medic immune electric
$medic immune electricwater
$medic immune thrownobject
$medic immune grenade
$medic immune beam
$medic immune rocket
$medic immune impact
$medic immune bullet
$medic immune fast_bullet
$medic immune vehicle
$medic immune fire
$medic immune flashbang
$medic immune on_fire
$medic immune gib
$medic immune impale
$medic immune bash
$medic immune shotgun
$medic immune aagun
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Jeepers

Post by Shifty »

Lol he's a hard git isn't he
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

$medic nodamage :P :lol: :wink:
Image
Guest

Post by Guest »

OR OR OR.... could you give the AI a high health number, BUT if he is killed, respawn him at the starting point? That would change the objective a lot, making it more of a multiple try/time limit.... or maybe.... give the plane a damage model and the attackers have the option of destroying the plane or killing the AI, spawn defending team at two locations, with the plane and with the AI??? Of course, guys have to be competent enough to actually defend the plane and not run off like cowboys....

Kind of a 'free-thought' moment there, sorry! Good luck!
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Ok

Post by Shifty »

So Heres what I'm thinking about

An SAS Officer sent to destroy a radar System within a German airfield has been caught and is currently being held in a jail cell beilieved to be somewhere in the airfield complex.

Allied Objectives

Rescue and Escort the Agent to an waiting Plane
Defend the Plane
Complete His Previous Objective

Axis Objectives

I'll Post a quick Setch of what i'm thinking off for the Map Layout so you Guys can gimme some suggestions
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

oops lol

Post by Shifty »

Axis Objectives

Prevent the Retrieval of the Prisoner
Destroy the Plane
Defend the Radar System
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Image
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Why not make a TOW map?
Live to map, not map to live.
-mohaa_rox, .map
moderator
Post Reply