Overwhelmed?

If it's not ZDoom, it goes here.
Post Reply
roundtree
Posts: 56
Joined: Tue Aug 10, 2021 8:57 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Overwhelmed?

Post by roundtree »

I was just wondering, has anyone ever felt overwhelmed and intimated by scripting? For example, I used to be scared of source code. Also failed every time I tried to compile it until I learned how to. Then after I did a few times, I was no longer afraid of it anymore. With scripting, maybe its the indentation, the codes, the tags, I don't know. Its like I try to learn it, but my brain refuses. If I try to force myself to learn it, it makes me violently angry. Then I have to go play some Doom. I think I just need greater discipline.
stevet1
Posts: 36
Joined: Thu Jan 28, 2021 5:30 am

Re: Overwhelmed?

Post by stevet1 »

Start simple, try and replicate a function that you could do through normal activation e.g. a platform raise etc.
There's loads of online help for each function, just search zdoom + what you want to achieve.
I'm sure you know but the indentations etc are completely unnecessary, only used for readability.
What tool are you using for scripting? It's easier with something that has some form of intellisense to help with the params and method names, e.g. use Ultimate doom builder rather that slade which doesn't have any (that I'm aware of - there maybe a better plugin?).
If you're developing scripts with decisions and logic in them it helps if you've had some form of programming experience but it's not difficult to pick up even without.
If you want to write a script that is called by an action within your level (rather than one that would be called automatically e.g.ENTER OPEN etc.) then just start by declaring the script definition and giving it a unique name and putting the method to call within the braces
e.g.
script 99 (void)
{
Plat_DownWaitUpStay(100,16,105);
}

I tend to use numbers to name scripts but you can use names as well.
The (void) indicates the parameters that can be passed to the script. void means no params. You could e.g. reuse a script to raise a platform and pass in the sector tagId each time and have the script use that when calling the platform_raise method.
e.g.
Script "raise_platform_custom" (int vTagId)
{
Plat_DownWaitUpStay(vTagId,16,105);
}

Next you might want to introduce some logic, perhaps checking that another action had been performed before the platform could be lowered - this is where the power of scripts comes into it's own.
My advice would be start off simple, compile and test and add in complexity as you go checking at each stage that it does what you expect.
Some useful methods include -
delay() -- delays the script execution by a number of tics (1/35th of a second approx)
tagwait() -- waits until a sector has stopped moving
print() -- useful for debugging, output variables or actor properties etc.
Good luck!
Cheers.
roundtree
Posts: 56
Joined: Tue Aug 10, 2021 8:57 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Overwhelmed?

Post by roundtree »

Thank you for talking to me. And to the moderator: sorry if I was off topic. But I'm going to study your message and come back to it and study it some more after I've finally learned a little. I have never gotten programming to sink into my brain, but there are some things that I've had to literally hammer into my head to learn, but once I learned it was worth it.

As far as the text editor goes, I have just been using a plain one with no intellisense at all. Xed is the name of it. It's in Linux Mint, but I'm on a dual boot, so I can run programs in Windows also. I've just been experimenting with Wine lately to try to get more Windows programs to work. My dream one day is turning my back on Windows forever. Makes me want to try Ultimate Doom Builder right now. (I'm on the new Linux Mint). I'm going to go see if it runs in Wine. But if not, I can just reboot into Windows.
roundtree
Posts: 56
Joined: Tue Aug 10, 2021 8:57 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Overwhelmed?

Post by roundtree »

Oops! Didn't realize that was also a Linux program as well! Forget Wine for now... I'm going to go compile some source code. I've already used Slade3 but never Ultimate Doom Builder.
roundtree
Posts: 56
Joined: Tue Aug 10, 2021 8:57 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Overwhelmed?

Post by roundtree »

All compiled! The instructions on the home page worked great. I have version R3274. I should go use some tutorial videos. Honestly, I have used Oblige and Obsidian, but I've never actually created a Doom level by hand. This programs looks awesome!
Attachments
Screenshot at 2022-01-18 01-25-15.png
Post Reply

Return to “Off-Topic”