Jump to content
  • 0

How do use use built-in script arguments ?


TheEvilGrin

Question

Hi,

I recently tried to use the "Line_SetBlocking" function in one of my scripts. Some of its arguments are "already defined" according to the ZDoom wiki. The thing is, when I type "BlockPlayer_F" at the right place, it turns red instead of blue/green, and I get an error message when I try to test the map, telling me that the argument is not valid or something along those lines. It also occured when I tried to use a pre-defined colour in a message script.

Where does that come from ? Do I have to define it at the beginning or anything like that ? Is it just DBX having bugs ?

Thanks for your answers !

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

Did you include zcommon.acs? If yes, we will need to see your code. Paste the entire script, including any code outside of scripts.

Share this post


Link to post
  • 0

Yes I did. Here's the code

#include "zcommon.acs"

 

int bluekey = 0

script 1 (void)
{

bluekey = 1 ;
}


script 2 (void)
{
if(bluekey==1)
        {
        Line_SetBlocking(49,0,BlockF_Players);
        }
        else
        {
        print(s:"you need the blue skull");
        }

}

Share this post


Link to post
  • 0

The only real problem I see is a missing semicolon after "int bluekey = 0"

 

Other than that, I would try removing the space between "1 ;" although it shouldn't matter, and put BlockF_Players in all caps.

Share this post


Link to post
  • 0

I fixed it. I gave the line 49 as a line id with an action and not with a tag..... and everything works fine now. The thing is, I had to do something else with my map, but I guess I'll reuse that later.

Thanks nonetheless !

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...