Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Epyo

A script that is global or something

Recommended Posts

You could use global variables. In the script code, before any of the scripts and before any of the mapspots are defined, put this in:

world int 1: whatever;
world int 2: anything;
Do this in every map that you want to use these variables. Suppose you want to make a countdown that spans all of the hub. This variable can be used throughout all of the maps.

What kind of script are you using, and is it fragglescript or ACS (if you're using fragglescript, then just ignore all this)?

Share this post


Link to post

If you're making more than one hub, those variables can even cross over to a different hub (in fact, one of the puzzles in my project will be using this, heheh).

Share this post


Link to post

We are using "Global Variables" very effectively in Dadaleus: Alien Defense and we have four hubs in this project...It gives alot of flexibility for us...


Cadman - Member TeamTNT

Share this post


Link to post

Did you want to make a SCRIPT that runs in every level? If so that's possible too. ZooM has about 10 scripts that are run in every level (it also has about 15 global variables).

If you want to make a script that you can call from any map, you can use a library. You can look in the ZDoom Scrapbook for libraries, but they're a little complicated to figure out (at least it was for me), so I can help you out if you want.

Share this post


Link to post
Nanami said:

If you want to make a script that you can call from any map, you can use a library.

Is there actually any advantage over simply #include'ing the scripts you wrote?

Share this post


Link to post

seems the same, perhaps libraries don't compile the code into every script on every map and just use the same library lump for each map instead, that's what I'd assume anyway. kinda like the #ifndef 's you put at the beginning of header files in C/++ to avoid multiple inclusions

Share this post


Link to post

Hmmm yeah. And if you're using #include you have to recompile every script that uses the #include'd file :|

Share this post


Link to post
boris said:

Hmmm yeah. And if you're using #include you have to recompile every script that uses the #include'd file :|

That's probably it. ;)

Share this post


Link to post

heh not that compile times are very lengthy with acs anyway, I have a 1430 line script here that takes around one second to compile...

Share this post


Link to post
Cadman said:

We are using "Global Variables" very effectively in Dadaleus: Alien Defense and we have four hubs in this project...It gives alot of flexibility for us...


Cadman - Member TeamTNT


Holy crap, Dadaleus is still being worked on! I completely forgot about it. Geez, I'm really slow. Now if you'll excuse me, I'm going to go crawl back under my little rock until about five years after it's been released.

Share this post


Link to post
geekmarine said:

Holy crap, Dadaleus is still being worked on! I completely forgot about it. Geez, I'm really slow. Now if you'll excuse me, I'm going to go crawl back under my little rock until about five years after it's been released.


so you'll be back in ten years then?

Share this post


Link to post

You guys are funny man! As I've said before, Dadaleus is basically complete! We are tweaking scripts, decorations and adding cutscenes. All four hubs are very playable and can be completed...BTW, no original Doom2 textures are being used, we are using all new textures and flats and we have some interesting surprises.

Real life has a tendency to get in the way, actually most of the time, but it will be done!

Cadman - Member TeamTNT

Share this post


Link to post

As with ALL projects, it can be brought to "almost complete" in about a week. Afterwards, the last 1% can range from approximately 5-10 years.

Share this post


Link to post
Cyb said:

okay so five years was a bit harsh... 2 years? :P


Heh! That's funny man...naw, maybe 3 and a half years should just about do it. ROFL!

Cadman - Member TeamTNT

Share this post


Link to post

It's funny you should mention three and a half years...

Doom2000 is well on the way to a complete release in early 2000, but we just knew you needed something before the end of the year. That is, the end of the year 1999, as reckoned by our central TeamTNT server, in US Eastern Time.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×