zone who grows fast...than gets small etc.

Designed a level that creates new, exciting, and challenging Armagetron game play? Or maybe just something funky. Put it right here.
safariskater
On Lightcycle Grid
Posts: 24
Joined: Thu Oct 11, 2007 12:20 pm

zone who grows fast...than gets small etc.

Post by safariskater »

Hey Guys

What i have 2 prog for that:

Deathzones who grows (really fast) and than after some secounds get small:

On the Pic is what i mean.


Best Regards safa
Attachments
Heres what i mean
Heres what i mean
CT-ct-CT
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

If it's just one deathzone, you may be able to get away with scripting it via config variables; you'll have to set WIN_ZONE_INITIAL_SIZE and WIN_ZONE_EXPANSION to the right values at the right time.

Otherwise, you'll need to hack gWinZone.cpp/.h. The variable you'll need to change at the right time is gZone::radius_, and then you'll have to call gZone::RequestSync after the deed. The variable contains reference size and current expansion speed, you can just call gZone::SetExpansionSpeed() to set the new current speed and keep the current size as it is.
safariskater
On Lightcycle Grid
Posts: 24
Joined: Thu Oct 11, 2007 12:20 pm

Post by safariskater »

Z-Man wrote:If it's just one deathzone, you may be able to get away with scripting it via config variables; you'll have to set WIN_ZONE_INITIAL_SIZE and WIN_ZONE_EXPANSION to the right values at the right time.

Otherwise, you'll need to hack gWinZone.cpp/.h. The variable you'll need to change at the right time is gZone::radius_, and then you'll have to call gZone::RequestSync after the deed. The variable contains reference size and current expansion speed, you can just call gZone::SetExpansionSpeed() to set the new current speed and keep the current size as it is.

sorry i understand nothing ^^ on german?
CT-ct-CT
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

I'm saying that there is no stock way of achieving your effect and that you either have to do some external config scripting (which only works if all your deathzones are supposed to move synchronously) or hack the code, which requires some C++ knowledge (which the description assumed).
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

C++, ugh. im learning that right now, i just got this HUGE book on it. ugh. when i get finished with it, i am going to make the cool win/death zones that grow and shrink
Image
Image
Image
User avatar
Loor
Average Program
Posts: 95
Joined: Sun May 06, 2007 11:54 pm
Location: ∞

Post by Loor »

OBJ C is better :P

But Couldn't you just do it with 1 death zone and a wall?
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

ok saf, im working on your weird project. im planning on adding map features, like for zones, the regular growth will be there, and shrinkth, growthTime, and shrinkthTime. also settings for regular, non-map zones.
ps: z-man, you stink at documenting
Image
Image
Image
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

actually z-man, looking at gWinZone.cpp, i dont think gWinZone.h will need to be changed
Image
Image
Image
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

You could always use a ready hacked server, 0.2.8-sty+ct, which allows you to set a zone's radius at any point in time via a script and how long it takes to reach it's specified size.

you could use a script something like the attached php script (I tried to paste it between code tags but it seemed to think I was code injecting or sumsuch).

Take a look at the ct wiki for ways to run a basic scripted server etc.

That script is untested, but something like that would do what you want.

Depends whether you'd rather hack C++ or php (or some other scripting language of your choice) ;)
Attachments
script.php.not.zip
basic script
(761 Bytes) Downloaded 189 times
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

this doesnt sound like it, but i think c++ would be better. ive gotten a good start, but right now i need at c++ timer for it.
Image
Image
Image
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

ivantis wrote: ps: z-man, you stink at documenting
I'm sorry we didn't write your program for you in the example code, go blow yourself.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Post by kyle »

why don't you read and interpreted the console timer messages that you can set to output every second of the game?
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

what? /me never heard of this
Image
Image
Image
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Post by kyle »

using ct+sty code there is a GAME_TIME line that prints to ladderlog.txt
you can configure its increments
LADDERLOG_GAME_TIME_INTERVAL 1 (for how often you want it to print, usualy every 1 secound)

LADDERLOG_WRITE_GAME_TIME 1 (1 so it write to ladderlog)

it will output the GAME_TIME as a decimal number
it starts around -3 where the the grid is being created and then starts counting up from 0 once the game begins

then you use SET_ZONE_RADIUS to change the radius of the zone
you will have to SPAWN the zones(with names) at the start of the script (GAME_TIME -3)

hopefully this makes a bit of sence read ed's post again between the 2 i think you may understand it.
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

i dont know if that would work, but if i look at the source and use a similar timer, maybe
Image
Image
Image
Post Reply