Author Topic: Breakable glass help.  (Read 5850 times)

Offline Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Breakable glass help.
« on: June 28, 2015, 06:04:51 PM »
I need help on breakable glass I also want it to be translucent. Any answers.

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4251
    • IFOCSERV
Re: Breakable glass help.
« Reply #1 on: June 28, 2015, 06:37:33 PM »
If you're using hexen format I think you're out of luck

If you're using UDMF, just modify the translucency in custom settings, but I think UDMF still bugs out in zandronum, make sure you test your map in both software and opengl in zandronum if you go with UDMF.
"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 Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #2 on: June 28, 2015, 06:53:15 PM »
Thank you. I am going to try it out on acs.

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: Breakable glass help.
« Reply #3 on: June 28, 2015, 06:58:48 PM »
If your using Hexen, you can use a script.


First, set the line's special to be a line ID, and give it a unique number. Also, set the line to Impassible, and activate when shot/projectile hits. In an OPEN script, you want these lines:


Code: [Select]
TranslucentLine(lineID, translucentAmount, 0, 0);
SetLineSpecial(lineID, 49, 0, 0, 0, 0, 0);
*translucentAmount is from 0-255


You can give as many lines as you want that same ID, and they will all function as translucent breakable glass.


@75: never underestimate the power of a good script :P I did some pretty funky things with Hexen format before UDMF came out.
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 Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #4 on: June 28, 2015, 07:03:32 PM »
@CM2109 when I start my game I get a script error which says invalid declarator.
« Last Edit: June 28, 2015, 09:56:37 PM by Drwalrustein »

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: Breakable glass help.
« Reply #5 on: June 28, 2015, 11:15:36 PM »
You obviously didn't setup the script right.

Read this: http://zdoom.org/wiki/ACS

Don't copy exactly what I put; it won't work. I'm not going to give you the exact code for it, because if your going to use ACS, you need to understand how and why.
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 Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #6 on: June 28, 2015, 11:36:18 PM »
I fixed it with a little help from the zdoom forums. Also when I put it in the script it won't work, here is my script.

Code: [Select]
#include "zcommon.acs"

script 1 (void)
{
   print (s:"Welcome to Flem labs inc, where our flem is your flem" );
   delay (50);
   
   Translucentline(0, 6);
   SetLineSpecial(0,49);
}
« Last Edit: June 29, 2015, 10:27:04 AM by Drwalrustein »

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 68
  • Posts: 2694
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: Breakable glass help.
« Reply #7 on: June 29, 2015, 11:30:16 AM »
I am a little disappointed.  I spent two hours explaining an absurdly simple method of making breakable glass that works entirely without scripting and works in all source ports including the original DooM.  I even made up example wads, when Drwalrustein failed to understand what I was talking about. (Seriously. The entire explanation should only have taken five or ten minutes.)

And after all that, his reaction was basically, "Meh. I'm want to use scripting."


Anyway, the method is simple, it is easy to set up, and requires no scripting. It starts you off with the glass as a barrier, and ends with a hole you can walk through. It does not make a shattering sound or throw shards of glass around, but that can easily be done (even in the original DooM) by placing an object behind the glass that makes the sound when it sees the player.  In the original DooM and ALL source ports, such an object can be made with DEHackEd, and in ZDooM based ports it can also be done in DECORATE.


Offline Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #8 on: June 29, 2015, 11:43:48 AM »
I went with scripting since I thought you can't make it translucent with that method. I want to see through it.

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4251
    • IFOCSERV
Re: Breakable glass help.
« Reply #9 on: June 29, 2015, 06:36:09 PM »
I fixed it with a little help from the zdoom forums. Also when I put it in the script it won't work, here is my script.

Code: [Select]
#include "zcommon.acs"

script 1 (void)
{
   print (s:"Welcome to Flem labs inc, where our flem is your flem" );
   delay (50);
   
   Translucentline(0, 6);
   SetLineSpecial(0,49);
}

You have to set the line ID in the map, I'm pretty sure line ID 0 is either invalid, or you're trying to set EVERY line in the map as breakable, give the line you want to be breakable glass a line ID using the Set Line ID linedef action, then set your script to effect that line ID number.
"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: Breakable glass help.
« Reply #10 on: June 29, 2015, 11:21:26 PM »
ID 0 is ignored.


1. Your script needs to be 'OPEN', not '(void)'
2. The first number needs to be a lineID.
3. DO NOT leave the rest of the arguments out. Even if they are 0. In some source ports you can do this, but most will throw an error.




Also, yeah Boingo, that method works and we know about it. He wanted a translucent texture though, so you need to use scripting if in anything that's not UDMF, because you can't put multiple actions on a line.
« Last Edit: June 29, 2015, 11:23:12 PM by ChexMaster2109 »
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 Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #11 on: June 29, 2015, 11:47:08 PM »
When I put it in open it gives me an error and when I add numbers to the translucent it gives me an error and also to the line special.

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: Breakable glass help.
« Reply #12 on: June 30, 2015, 12:54:50 AM »
Really, you can't expect help if you don't elaborate. I can't give you a fix if I don't know what the error is.
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 Drwalrustein

  • Walrsuses
  • Cycloptis
  • **
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 456
Re: Breakable glass help.
« Reply #13 on: June 30, 2015, 09:28:07 PM »
So here is the problem in line 2 of the script where it says script when I out open it says invalid variable type.
Code: [Select]
#include "zcommon.acs"

script 1 (open)
{
   print (s:"Welcome to Flem labs inc, where our flem is your flem" );
   delay (50);
   
   Translucentline(1,6);
   SetLineSpecial(1,49);
}

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: Breakable glass help.
« Reply #14 on: June 30, 2015, 09:35:13 PM »
You need to read what I wrote more carefully. I said 'OPEN' not '(open)'. Also, you still need the extra 0's in TranslucentLine and SetLineSpecial.
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