* FAQ    * Search  * Register * Login 
Active topics
Unanswered topics

All times are UTC-06:00



Post new topic  Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Scripting, matcen > action
PostPosted: Sat Sep 13, 2008 3:06 am 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Sup folks

Im new to scripting. Have just made a few that works. Get a key to open a door, end level on either room enter or bot killed, and stuff.
What I can't figure though, is how to....like...when all bots from an matcen is spawned and killed---> open a door. Or, all matcen bots killed ---> end level.

Anyone?
Thanks

Leon


Top
   
 Post subject:
PostPosted: Sun Sep 14, 2008 12:38 am 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Fri Apr 30, 1999 2:01 am
Posts: 5775
ICQ: 37279425
Website: http://www.kyouryuu.net
AOL: kyouryuu32
Location: Isla Nublar
It's been a really long time since I touched DALLAS.

I'm not sure if what you are asking is possible. In order to track the death of a given robot or robots, you have to give them individual names if I remember correctly. The problem with the Matcen is that it is spawning robots on-the-fly and therefore you can't name them.


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 7:32 am 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Ah, ok, thats some bad news.
Hmmm, I wanted to make a SP lvl where the main fokus was to fight bots. like, you enter a room, the door locks behind you, a matcen start to spawn bots, and when you have killed them all you get access to what ever you was looking for in that room, and the door opens again.
Maybe theres some other way around this, I dunno, if its possible to script the matcen (not the bots) so when its finish, then you get what ever effect you want.


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 11:30 am 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Fri Apr 30, 1999 2:01 am
Posts: 5775
ICQ: 37279425
Website: http://www.kyouryuu.net
AOL: kyouryuu32
Location: Isla Nublar
Maybe don't rely on a Matcen to do it?

Maybe look at how Proving Grounds set this up in Descent 3. I think in those situations, the boss robot was just there already, waiting for your arrival. Another potential option is that you can hide robots until you are ready to use them, IIRC.


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 12:12 am 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Matcens is kind a useless if you cant script them. They are just there.....but not part of the story!?

Yes, the bot can be there from the start, but I was thinking of a lot more than just one or even 2-3. More like 20, but fighting 20 bots at the same time is just over the top.
I can hide them you say? Does that mean I must script every single bots? Sound like an option, must be a lot of scripting, though.

If I can't figure a way to do this, I'll come up with another gameplay or story. Is just that I wanted a kind of \"anarchy\" feel on the mission. You advance from one area to the next one by killing all the bots. What I like about SP levels is the fighting. I don't mind pusles much, and the replay value is low as well.

Ok, I'll try somting
Thanks for your help Kyouryuu

Leon


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 8:23 am 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
I'm not sure it can be done through DALLAS (I'd have to go back and look), but it's certainly possible. After all, there's the scripting in the SP level where you have to kill all but a few of the troops.


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 12:49 pm 
Offline
DBB Master
DBB Master
User avatar

Joined: Thu Nov 22, 2001 3:01 am
Posts: 9205
WLM: biffski@yahoo.com
Location: Beaverton, Oregon USA
I think the problem would be in what you 're trying to do Leon, is that in order complete your script, you would have to ID each bot spawned so the script would know when to go to opening the door.

I'm not sure that the D3 engine allows for that kinda process. You can script metcens and there is also a tool within the editor that allows you to assign certain properties outside of scripting. (triggers and such) But assigning an ID or name to each bot as it is spawned? I'm not certain that, that is possible.


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 2:11 pm 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Hey.

I'm really new to this, so my sugestions might sound stupid.
When I make a matcen I set maximum bots to produce, so d3 at least know how many bots the matcen will generate. Then it should be possible to script ' when matcen1 has produced 20 objects, open door1'
This script wouldn't be optimal though, cus you get and complete message before you have killed the last bot, kind a odd.
I haven't find out how to script matcen at all, so I dunno about this.

Edit, Or maybe its possible to set a timer on the matcen. Matcen will be active for.....lets say 5 min. and door opens after 5 min, as well.


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 2:33 pm 
Offline
DBB Ace
DBB Ace
User avatar

Joined: Mon Apr 17, 2006 2:13 pm
Posts: 197
Location: The Netherlands
There's an event generated when a matcen spawns a bot, which can give you
its object handle.

Finding out when such newly generated bots are destroyed is another matter.
I'm pretty sure it can be done, but maybe not using just DALLAS since it only
lets you tie events to pre-existing objects.

You'd have to trap all \"Object destroyed\" events and compare the handles to
a list of spawned bots which you are maintaining.


Top
   
 Post subject:
PostPosted: Wed Sep 17, 2008 6:38 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Fri Apr 30, 1999 2:01 am
Posts: 5775
ICQ: 37279425
Website: http://www.kyouryuu.net
AOL: kyouryuu32
Location: Isla Nublar
I don't have DALLAS installed, but maybe an if-then can do this? If you use an if-then, you may be able to capture the robot as the owner in the \"if\" clause, and then check against it in the \"then\" clause?


Top
   
 Post subject: Re:
PostPosted: Thu Sep 18, 2008 2:06 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
The Lion wrote:
I'm pretty sure it can be done, but maybe not using just DALLAS since it only
lets you tie events to pre-existing objects.


Agreed, it wouldn't be too hard to do using the D3 SDK C++ code.

But I think Leon is strictly using the DALLAS script editor... correct?


Top
   
 Post subject: Re:
PostPosted: Thu Sep 18, 2008 2:17 pm 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Foil wrote:
The Lion wrote:
I'm pretty sure it can be done, but maybe not using just DALLAS since it only
lets you tie events to pre-existing objects.


Agreed, it wouldn't be too hard to do using the D3 SDK C++ code.

But I think Leon is strictly using the DALLAS script editor... correct?


Correct!


Top
   
 Post subject:
PostPosted: Sun Oct 26, 2008 8:15 am 
Offline
DBB Ace
DBB Ace
User avatar

Joined: Sat Feb 11, 2006 9:57 pm
Posts: 461
Website: http://www.prepare4descent.net
Location: NH
I think this can be done with DALLAS: There is an event 'Matcen Spawned' where the matcen id is specified and the spawned object becomes 'IT'.

Two ways I see it could done, either count the number of spawns and trigger when the last bot spawns... would open the door with one bot alive...

or: Make the last spawn of the matcen be a non robot object, like a power up, then the script could check for a non-robot spawn. (IT is (object type robot) = false) Then the player would be left with a power up and an unlocked door.

oops... sorry for the bump... and I see LEON has already released his level. :oops:

_________________
Prepare For Descent! | Planet Descent


Top
   
 Post subject:
PostPosted: Sun Oct 26, 2008 9:53 am 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Thanks WillyP, I'll take a look at it.

As for my level, I droped the story and made a fight only level :)

Leon


Top
   
 Post subject:
PostPosted: Sun Oct 26, 2008 3:20 pm 
Offline
DBB Ace
DBB Ace

Joined: Mon Feb 09, 2004 3:01 am
Posts: 237
Location: Oslo, Norway
Ok, did some testing.

when matcen [matcen ID] has spawned an [IT]
IT is an powerup
Then open door 1

I made a matcen that spawned 4 robots first then last spew was an shield powerup.

And the door open up :)

Only thing i couldnt figure was to ID the matcen, since thers no matcen identification, as far as i know.
So if i have several matcen in a level, it would be
an problem, no?

Edit: Checked some more, matcen are named 'matcen1' 'matcen2' and so forth. I might use those ID's.
But i didn't find a way to set matcen ID in dallas.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Descent'rs have piloted these pages
 
The layout and contents contained within this site are © DescentBB.net 1997-2006.
Descent, Descent II are © Parallax Software Corporation.
Descent III is Outrage Entertainment.
Descent is a Trademark of Interplay Productions.

Miner Wars™ is trademark of Keen Software House s. r. o.
.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group