home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


General Thread

by Aardappel on 01/05/2002 01:55, 15527 messages, last message: 03/01/2024 13:02, 12602581 views, last view: 11/12/2024 21:31

for questions, announcements etc.

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#12519: Monster scripting variables help needed

by steveh on 09/01/2009 13:49

Hello,

I've created a singleplayer map in Sauerbraten with monsters. If has 28 monsters to kill. 10 of these are underground and you fall through a trapdoor to reach them. What I need to know is this.

Is there any variable that can be called fron a script that holds the number of monsters currently dead ? I only want the trapdoor to open when 18 monsters are dead leaving 10 underground.

ie,
if (monsterdead = 18) ['opentrapdoor'] else ['trapdoorclosed']

So you must kill all 18 monsters before the trapdoor will open.

I have tried /showfrags /monstertotal /frags /showfrags ect with no luck.

I see in the scripting guide that there is a variable called 'monster_dead_T' but I could not figure out have to use this.

Also I would prefer to end the game with an 'end of level trigger' rather than end when all the monsters are dead.

Thanks in advance for any advice.


reply to this message

#12520: Re: Monster scripting variables help needed

by MeatROme on 09/01/2009 18:02, refers to #12519

Current monsters killed is not available from CubeScript .. the SP parts of Sauerbraten are legacy and haven't been improved upon in a long time (sadly) .. be glad they're still there though, 3dotlabs was contemplating taking them out altogether!

Try "killsendsp 0" for ensuring the End-Of-Level trigger needs to be reached instead of all monsters killed.
The alternative solution to this has always been to put a monster somewhere inside an unreachable box of geometry .. so everyone will always have left one.

HTH

reply to this message

#12521: Re: Monster scripting variables help needed

by MeatROme on 09/01/2009 18:03, refers to #12520

Oh. BTW - wrong thread - this should've gone into "Map Editing"!

reply to this message

#12522: Re: Monster scripting variables help needed

by steveh on 09/01/2009 18:35, refers to #12520

Thanks for the reply. I will try your suggestions. I agree its a shame that SP lags behing MP in development. I may try blood frontier as I hear its SP orientated. Cheers.

reply to this message

#12523: [Question] Compiling Sauerbraten-Engine without using an IDE

by RungAaz on 09/04/2009 16:14

Hi,

i just read how to compile the sauerbraten engine with Code::Blocks and VC++.
but is there any way to compile it manually with MinGW without using an IDE.

MeatROme says:
I've not tried CodeBlocks on Windows myself, but I used to handle it via MinGW/msys manually [...]

reply to this message

#12524: Re: [Question] Compiling Sauerbraten-Engine without using an

by Quin on 09/05/2009 02:43, refers to #12523

As code::blocks uses mingw, I'd say the chance is likely, you just need a makefile.

reply to this message

#12525: Re: [Question] Compiling Sauerbraten-Engine without using an

by eihrul on 09/05/2009 03:38, refers to #12523

Look in src/vcpp dir. There is a codeblocks project in there: sauerbraten.cbp.

reply to this message

#12526: Re: [Question] Compiling Sauerbraten-Engine without using an

by MovingTarget on 09/05/2009 04:56, refers to #12523

You can use msys. Just cd into the src directory and make. I just tried it out.

reply to this message

#12527: Re: [Question] Compiling Sauerbraten-Engine without using an

by RungAaz on 09/05/2009 13:53, refers to #12526

ok thanks at all

i will try it out.

reply to this message

#12528: Re: [Question] Compiling Sauerbraten-Engine without using an

by RungAaz on 09/05/2009 14:09, refers to #12527

Yes it works. thanks!

reply to this message

#12529: Invisible monsters/weapons

by munkyface710 on 09/06/2009 07:13

Just downloaded Sauerbraten and whenever I try to play SP, all the monsters/weapons/certain other stuff is invisible. I've never had this problem in Cube and it's really hard to play the game when you can't see anything other than the map itself. Any suggestions?

reply to this message

#12530: Map Saving Directory

by dagurdragon on 09/06/2009 07:36

I have been working on a map for a while now, and have been able to save a load it. Now for some reason I am unable to find the map file on my pc, I have tried windows search but no solution.

Does anyone have any idea what is going on? BTW I have windows vista home basic 64bit.

reply to this message

#12531: Re: Invisible monsters/weapons

by FiReLoVeR on 09/06/2009 15:13, refers to #12529

I get the same thing on the school computers. I think that it is because the computer doesn't have a good enough graphics card to support Sauer.

reply to this message

#12532: Re: Map Saving Directory

by FiReLoVeR on 09/06/2009 15:15, refers to #12530

Sauerbraten/packages/base. The map files should be in there. At least for XP. Hope that it's the same and that this helped.

reply to this message

#12533: auth key?

by Kane1073 on 09/07/2009 07:34

I've been playing sauer for several years under various names and I was wondering if it would be possible to get an auth key. I understand that as a relatively random person, I should have no expectation of being a granted such a request purely on my word that I'm a good person/player/whatever but I figure it can't hurt to try. It bothers me when there are people cheating and they get away with it solely because no one is around to stop them.

reply to this message

#12534: Re: auth key?

by eihrul on 09/07/2009 08:31, refers to #12533

I generally require that someone who has an authkey already refer you, otherwise there would be no way to control who got them.

reply to this message

#12535: Re: Monster scripting variables help needed

by redon_onanotherpc on 09/08/2009 13:23, refers to #12520

That\'s not true actually, there is a new variable that can be used for that in the new release, eihrul added it when I was working on my SP map Lost.

@steveh
I\'m not exactly sure anymore how it works, but I think it was like this:

The command (nummonsters $x) will give you the number of monsters there are that have the number $x as their second entity parameter.
So basically, you either have to make a script that checks how many monsters there are left whenever you walk over the trap door.

That would be something like this:
Set the door to mapmodeltype 11 (third parameter) and a tag y (fourth parameter). Then put a second invisible mapmodel (second parameter -1) over it with the mapmodeltype 7 (that\'s a trigger that keeps on working whenever you walk over it - 3 would be a trigger that works once) and the tag z.
(Note: x, y and z stand for random number that you can pick yourself.)

Trigger: mapmodel -1 7 [z]
Trapdoor: mapmodel [rotation] [door model] 11 [y]

Then Change the third parameter of all monster on the top floor to a monstertag x:

monster [rotation] [monstertype] [x]

Now write a script for the trigger that checks if a monster of tag x is still alive, and opens the trapdoor if yes:

level_trigger_z = [
if (> (nummonsters x) 0) [trigger y 1]
]

The second solution would be a script that checks the monster number every few miliseconds, but that\'s a bit more complicated.
Have fun and if anything about it doesn\'t work, just ask, it could be that I didn\'t remember something correctly.

reply to this message

#12536: Re: Monster scripting variables help needed

by Redon on 09/08/2009 20:27, refers to #12535

Correction: I wrote second parameter for monsters in the first half of the post, I meant the third. Also the script is wrong, it's supposed to be:

level_trigger_z = [
if (> (nummonsters x) 0) [] [trigger y 1]

reply to this message

#12537: Re: Monster scripting variables help needed

by Redon on 09/08/2009 20:38, refers to #12536

Argh, doing too much mistakes today :)

In the first reply, it's supposed to be:

Trigger: [rotation] mapmodel -1 7 [z]
Trapdoor: mapmodel [rotation] [door model] 11 [y]
(forgot the rotation on the first one)

and I explained the script wrong, I meant "Now write a script for the trigger that checks if a monster of tag x is still alive, and opens the trapdoor if NO"

Sorry for all the corrections (Edit Button would be nice ;) )

reply to this message

#12538: Re: Monster scripting variables help needed

by Redon on 09/08/2009 20:40, refers to #12537

Oh my god seriously... Not my day, wrote it in the wrong order...

Trigger: mapmodel [rotation] -1 7 [z]

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages


Post a Message

Username

Email

Subject

Body

7 added to 5 =


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
58648443 visitors requested 76605053 pages
page created in 0.200 seconds using 10 queries
hosted by Boost Digital