home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Map Editing

by Goetzenzar on 01/05/2002 19:30, 4767 messages, last message: 10/18/2021 18:52, 2846974 views, last view: 12/09/2021 05:14

Welcome to the map editing saloon:
here u can post ur screens, maps, comments, questions and answers about mapediting, and meet other ppl for coop-sessions online :)

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

#3502: Re: Another Question

by SheeEttin on 04/26/2008 05:20, refers to #3501

Make it a loop that checks once per second if the override has been activated, and if not, continue counting down?

Or, you could lock the person in the room with the override and have them watch the timer count down until the last second, like they do in not-so-hot movies. ;)

reply to this message

#3503: Re: On lava

by SheeEttin on 04/26/2008 16:58, refers to #3498

eihrul's just added a death material to CVS, apparently... Gonna go play around with it. :)

reply to this message

#3504: Re: Another Question

by MeatROme on 04/26/2008 17:16, refers to #3502

Okay, just a few more thoughts of mine on this topic:
If you've got a countdown going I'm going to assume that this is already happening in some form of loop, probably brought on by a series of "sleep 1000"-calls - right?
Whatever function you're calling there should simply check for "override_active == 1" ... or in CubeScript:
if (= $override_active 1) [ echo "override activated" ] [ do_the_countdown ]

Where "do_the_countdown" is either a seperately defined alias (actually exactly the one you're using ATM) ... or just a 'placeholder' for it, meaning you wrap that bit of code around your existing stuff.

You should seriously share more information with us if you want any _real_ help ... not just speculations.
You can post your map-CFG on some pastebin (for example) and post the link to it here - then CubeScripters can easily see what exactly you are doing ... remember : in coding (as in mapping) there's always more than one way to skin a cat ;-)

reply to this message

#3505: Particles 8

by tentus_ on 04/26/2008 17:44

So as hopefully everyone with CVS knows, particles 8 looks to be the new way of making fire (yay fire!) However, there is a distressing lack of documentation on it, and I have not managed to glean much knowledge from reading renderparticles.cpp, so I'm coming here for enlightenment.

First off, entproperty 1. 259 seems to be the magic number for making the fire effect look like fire. Why is this?

Entproperty 2 seems pretty easy, controls the spread and orientation of the effect. Higher numbers means the effect is wider in diameter, negative numbers also mean that the fire burs down. Anything hidden in this value? I'm still not sure on how I feel about the "ring of fire" effect that happens with the higher numbers.

Then we get to the third entroperty. This one obviously controls the color of the particles, but I'm a bit fuzzy on how they actually work. Low negative numbers yield a generally effective color for fire, but from my experimentation, until you get to the very high positive numbers, you're stuck with weird shades of blue, teal and purple. Any light that can be shed on this?

---

By the way, while I'm talking about the docs, at the very bottom of editref.html there's a slight flaw. The HUD stuff has ended up in the pvsstats box (used </p> rather than </pre>).

reply to this message

#3506: Re: Particles 8

by MeatROme on 04/26/2008 18:03, refers to #3505

This is a bit involved .. for sure.
Let's see:
The line you should be looking at in engine/renderparticles.cpp is 1062; the case-switch this belongs to also contains the comment "<dir> <length> <rgb>" - which is respective to the arg2, arg3 and arg4.

You might want to look at http://www.quadropolis.us/node/908 where apflstrudl and I collaborated on some early particle-menu construction ... the menu is a bit of a bummer though, since the direction can be slightly misleading - it is never relative to yourself but always absolutely defined by the world.
North (or a yaw-degree of 0 (360 respectively)) is what it's relative to - without seeing your current personal yaw somewhere this will have to be set in a trial-and-error process.

So - take a look at how that menu constructs the calls if you like - it is defined in "entbodies.cfg" ...

But what you _/really/_ need is those two little "helper"-aliases for setting the colours - because they're expected as integer values - not 3 seperate values for each channel - you will have to pre-calculate the 3 channels (R, G and B) together into a single value ... which is what those wrappers can do for you.
(see "entfogcol.cfg" for those)

Demosthenes also put in some work on those particles :
http://www.quadropolis.us/node/1005

A lot of users seem to prefer his method ... but I'm guessing both of the approaches will have become somewhat obsolete with all the work baby-rabbit has been putting into the particles ... your mileage may vary.

HTH

reply to this message

#3507: Re: Particles 8

by SheeEttin on 04/26/2008 18:40, refers to #3505

Looks to me like particles 8 is set up identically to particles 4 (the little laser-particles everyone knows). Apparently, lightning (particles 7) can do the same.

Oh, and on color, there's a nice little way to get the right color on the command line. Instead of a decimal number, use hex in the form 0xRGB, where R, G, and B are the intensities of the respective colors. For example, pure red would be 0xF00, blue 0x0F0, and a nice yellow 0xA80. (The hex number will be converted to decimal when you hit enter; you can use any dec-to-hex converter to get it back in hex.)

reply to this message

#3508: Re: Particles 8

by SheeEttin on 04/26/2008 18:43, refers to #3507

Particles 9 (smoke) also behaves the same.

reply to this message

#3509: Re: Particles 8

by MeatROme on 04/26/2008 18:53, refers to #3507

LOL
I love it when my CubeScript becomes obsolete like that (via code enhancements) ... but I hate not noticing it.
Thanks for the info SheeEttin!

reply to this message

#3510: Re: Particles 8

by SheeEttin on 04/26/2008 19:49, refers to #3509

It also applies to fog and water (and I assume waterfall) colors (though those are 0xRRGGBB). ;)

reply to this message

#3511: Re: Particles 8

by tentus_ on 04/26/2008 20:48, refers to #3507

Ok, so I'm pretty clear on colour, but I'm still a little bit mystified by the shape attribute. I'm just a bit unclear about how the pattern actually works.

Also, if I'm interpreting/experimenting right, then there no way to actually scale the effect down to fit, say, a torch?

reply to this message

#3512: ..

by apflstrudl on 04/26/2008 21:16

well as far as i have tested it it works like particles 4 as sheetin said and you can just scale how far the fire goes, but not how big the fireball is. It's always the same size, you can just define how long it goes in the direction you've set (hard to explain for me, hope you understood what i mean :))

reply to this message

#3513: Re: ..

by SheeEttin on 04/26/2008 23:22, refers to #3512

You can't adjust the size of the fireball, no.
You can change the length, though, and that, coupled with a lighter color, will make it seem smaller.

reply to this message

#3514: Re: On lava

by Oh No Ghost! on 04/26/2008 23:40, refers to #3503

Awesome! Eihrul, you rock!

reply to this message

#3515: ..

by Captain_Ahab on 04/27/2008 03:25

is there any information about when the next official release will be?

reply to this message

#3516: ..

by Titanic12ship on 04/27/2008 03:53

Okay, here is the part of the config that controls the alarm system. As you can see, I used Hirato's alarm sound as the sound for the alarm. Also, you will see that I have already found one way to do what I had previously asked about, however there are some bugs, and I still want a more efficient way.

level_trigger_1 = [
if (= $shutdown 1) [echo "Nothing happens."]; if (= $shutdown 0) [echo "Intruder alert. Gases being released in 10."; alias gas 1; trigger 7 0; music hirato/sounds/deep-space-station/syna-max/alarm_of_d00m.ogg; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "9"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "8"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "7"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "6"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day."; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "5"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day."; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "4"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "3"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "2"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [echo "1"; loop $gas 1 [ if (= $gas 0) [echo "Manual override activated. Have a nice day"; trigger 7 1; playasong] [if (= $gas 1) [sleep 1000 [yourfate]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]



alias yourfate [if (= $gas 0) [echo "Manual override activated. Have a nice day."]; music playasong = [ music (concatword "fanatic/" (+ 1 (rnd 31)) ".ogg") playasong ]
playasong; trigger 7 1
if (= $gas 1) [kill; echo "Intruder was killed successfully. Gasses now leaving."; sleep 2000 [echo "I repeat: intruder has died."]]]


Now that you have seen how I've written the config, I think it would be easier for you to help.

reply to this message

#3517: Re: ..

by Quin on 04/27/2008 04:08, refers to #3516

Please use a paste bin to post code/script/log snippets.

http://pastebin.com/
http://pastebin.ca/
http://rafb.net/paste/

reply to this message

#3518: Re: ..

by SheeEttin on 04/27/2008 04:40, refers to #3517

Yarr. I can't even begin to read that.

reply to this message

#3519: Re: ..

by MeatROme on 04/27/2008 11:17, refers to #3516

Like Quin & SheeEttin I can't believe you pasted it here ... I did "hint" at pastebin myself already ...
Anyway .. I just looked at a few of the first lines and your scripting is soooo full of bugs I'm astonished it actually does anything for you.
Sorry. But there it is.

a) you don't provide ELSE-blocks for your IFs - this isn't critical (to my knowledge) but it surely improves readability and keeps your code cleaner (read less-prone-to-bugs).
Meaning:
if (CONDITION) [TRUE-Block] [FALSE-Block]
so ... maybe
if (= $answer 42) [ echo "you got it" ] [ ]

b) your LOOPs are seriously whacked
what on earth is "loop $gas 1" supposed to do? There's two mistakes there -
i) looping only once isn't a loop
ii) the variable doesn't require a "$"-sign ... you just say "loop i 3 [ echo $i ]"

c) I really don't understand what you're attempting to do with all those convoluted IFs inside your level_trigger alias ...

d) you're mixing "alias" with "=" usage - just decide on a style will-ya ;-P

e) you're still not preparing your own global variables before using them ... I seriously urge you to form that habit!

I'd go something like this:
<SNIP>
countdown = 10
overriden = 0

yourfate = [
if (= $overriden 1) [
echo "you've overriden the release of the gas."
] [
echo "release of gas in" $countdown
countdown = (- $countdown 1)
if (= $countdown 0) [
kill; echo "you failed."
] [
sleep 1000 yourfate
]
]
]

level_trigger_1 = [
yourfate
]

level_trigger_2 = [
overriden = 1
]
</SNIP>
Where trigger-1 would be used to start the countdown and trigger-2 would be the override-button-trigger.

HTH

reply to this message

#3520: texscroll

by %username% on 05/01/2008 19:49

Is `texscroll` command allows me to make texture scrolls vertically?

reply to this message

#3521: A Question

by Titanic12ship on 05/02/2008 03:57

Hello, I was wondering if there was a variable for health that I can use in scripting to add or take away the player's health.

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

5 times 1 =


content by Aardappel & eihrul © 2001-2021
website by SleepwalkR © 2001-2021
42367588 visitors requested 58074181 pages
page created in 0.062 seconds using 9 queries
hosted by Boost Digital