Author Topic: ACS questions  (Read 3232 times)

Offline LAZ Trooper

  • Must... keep... mapping... o_o
  • Chex Master
  • ****
  • Thank You
  • -Given: 53
  • -Receive: 23
  • Posts: 3418
  • Standing at the ready when Flemoids attack.
ACS questions
« on: November 25, 2010, 12:48:23 AM »
I'm working on an unannounced map with lots of puzzles and stuff, but I have a few ACS questions that I can't immediately find the answer to by searching the zdoom wiki.

1. Can I have an "if" script that requires multiple variables to be correct for it to function?

2. Is there some way to make something happen when a floor/ceiling reaches a certain height?

3. Is there a way for values to be added to a variable? (eg. one switch adds 1 to the number, another switch adds 2)
Use the CQ IRC channel! (were it working...)

Current Projects:
Chex Quest: The Great Invasion (on hold)
Chex Quest Skulltag Pack - mapper
The Chex Crusades: Return to Bazoik
Map of Epic (unannounced. If you notice this and ask about, good for you. You won't get any information. And I am out o

Offline MajorSlime

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4308
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: ACS questions
« Reply #1 on: November 25, 2010, 01:10:59 AM »
1. Yes, its something like (test & test) or (test && test). Someone else can give you better info on this one

2. Yes, but its very completicated. I think there might be a sector action that could do this though...

3. Absolutely, variable = variable + number;
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4250
    • IFOCSERV
Re: ACS questions
« Reply #2 on: November 25, 2010, 02:19:16 AM »
1. Can I have an "if" script that requires multiple variables to be correct for it to function?

sure!

an if statement always runs on a boolean statement. IF the boolean statement is true, it allows the statement in its block to execute. So basically, it's in the form

if(STATEMENT)
{
// This is executed if STATEMENT is true
}

now, on to your boolean statement

Google boolean operators, you'll find definitions for things like == (does NOT mean the same thing as =), ! (NOT), || (OR), and && (AND).

1 == 0 is an example of boolean statement, it will always return false, since 1 is obviously not equal to zero.

You can compare variables using something like this

x == 1

would output one if x equals one (true), otherwise, it outputs zero (false)

if you want to check more than one variable...

(x == 1) && (y == 2)

This will output one if and only if x equals one AND y equals 2.

If you want to compare two variables, that's just as easy

x == y

will be true if x equals y
[/quote]

Quote
2. Is there some way to make something happen when a floor/ceiling reaches a certain height?

http://zdoom.org/wiki/GetSectorCeilingZ
http://zdoom.org/wiki/GetSectorFloorZ

They demonstrate how to use it in an example. The function returns a value.

Quote
3. Is there a way for values to be added to a variable? (eg. one switch adds 1 to the number, another switch adds 2)

yes. These three expressions are equivalent, and they all increment a variable x by one (in other words, they all add one to x).

x = x + 1
x += 1
x++
« Last Edit: November 25, 2010, 02:22:58 AM by 75 »
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

You can find me on the CQFF discord: https://discord.gg/AgNhjem

Offline LAZ Trooper

  • Must... keep... mapping... o_o
  • Chex Master
  • ****
  • Thank You
  • -Given: 53
  • -Receive: 23
  • Posts: 3418
  • Standing at the ready when Flemoids attack.
Re: ACS questions
« Reply #3 on: November 26, 2010, 12:09:48 AM »
Thank you! This is going to help make this possible.
Use the CQ IRC channel! (were it working...)

Current Projects:
Chex Quest: The Great Invasion (on hold)
Chex Quest Skulltag Pack - mapper
The Chex Crusades: Return to Bazoik
Map of Epic (unannounced. If you notice this and ask about, good for you. You won't get any information. And I am out o

Offline LAZ Trooper

  • Must... keep... mapping... o_o
  • Chex Master
  • ****
  • Thank You
  • -Given: 53
  • -Receive: 23
  • Posts: 3418
  • Standing at the ready when Flemoids attack.
Re: ACS questions
« Reply #4 on: December 04, 2010, 11:56:26 PM »
Okay, another question. Does Thing_Deactivate only work on certain things (dynamic lights, particle fountains, etc.) but not on decoration things? And if not, is there something that will work for me?
Use the CQ IRC channel! (were it working...)

Current Projects:
Chex Quest: The Great Invasion (on hold)
Chex Quest Skulltag Pack - mapper
The Chex Crusades: Return to Bazoik
Map of Epic (unannounced. If you notice this and ask about, good for you. You won't get any information. And I am out o

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4250
    • IFOCSERV
Re: ACS questions
« Reply #5 on: December 05, 2010, 01:47:52 AM »
If you just want it to go away, there's always Thing_Remove
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

You can find me on the CQFF discord: https://discord.gg/AgNhjem

Offline MajorSlime

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4308
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: ACS questions
« Reply #6 on: December 05, 2010, 03:15:56 AM »
you have to experiment. It only works on objects that have a deactivable/activable base class. Unless you go into decorate, it would be hard to know what works and what doesn't. But yes, if you want something to go away, you could use thing_remove, or if you wanted to bring it back later, you could just move its coordinates.
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline LAZ Trooper

  • Must... keep... mapping... o_o
  • Chex Master
  • ****
  • Thank You
  • -Given: 53
  • -Receive: 23
  • Posts: 3418
  • Standing at the ready when Flemoids attack.
Re: ACS questions
« Reply #7 on: December 05, 2010, 12:26:39 PM »
How do you move a thing's coordinates? Searching the Zdoom wiki rarely gets me the results I need.
Use the CQ IRC channel! (were it working...)

Current Projects:
Chex Quest: The Great Invasion (on hold)
Chex Quest Skulltag Pack - mapper
The Chex Crusades: Return to Bazoik
Map of Epic (unannounced. If you notice this and ask about, good for you. You won't get any information. And I am out o

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4250
    • IFOCSERV
Re: ACS questions
« Reply #8 on: December 05, 2010, 03:45:11 PM »
SetActorPosition

I found that by clicking ACS functions in the left frame, then going down to the level alteration category. You'll get used to the wiki eventually, I had to ask a lot of questions like that in the beginning too.
« Last Edit: December 05, 2010, 03:47:11 PM by 75 »
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

You can find me on the CQFF discord: https://discord.gg/AgNhjem

Offline MajorSlime

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4308
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: ACS questions
« Reply #9 on: December 05, 2010, 07:28:43 PM »
SetActorPosition

I found that by clicking ACS functions in the left frame, then going down to the level alteration category. You'll get used to the wiki eventually, I had to ask a lot of questions like that in the beginning too.

QFT
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

 


Web Hosting by InMotion Hosting