Bad Dream - Texture flickering, player death, and Lights. [Help]

Author Topic: Bad Dream - Texture flickering, player death, and Lights. [Help]  (Read 1505 times)

I've been porting the map "Bad Dream" by [GSF] Ghost, and I've been having issues finding out how to have the TV screen flicker between a screen static texture and a black one.

I'm also having trouble figuring out how to make the TV screen emit light for effect, as I'm new to Torquescript stuff.

The other thing I want to do that sounds easy is have the player killed when they enter the closet, and have custom death messages for when they get killed that way.

Pictures of ported map: (Unfinished)


The original:


Another thing you should notice in the pictures is that the Lightbulb doesn't have the glow affect on it like in the original, I also would like to know how to do this as well.


For the TV screen I'd use two or three different textured models for the frames and then make a loop that switches between them

Like function tvloop(%i) { if(%i>2) {%i=0} settvmodel(%i); $tvloop = schedule(250,0,tvloop,%i+1);}

Then for settvmodel function you need to define a function with three cases, one for each model, based on the parameter. Idk about static maps so you have to figure that part out. It probably involves deleting the old TV screen model and creating a new one

For the TV screen I'd use two or three different textured models for the frames and then make a loop that switches between them

Like function tvloop(%i) { if(%i>2) {%i=0} settvmodel(%i); $tvloop = schedule(250,0,tvloop,%i+1);}

Then for settvmodel function you need to define a function with three cases, one for each model, based on the parameter. Idk about static maps so you have to figure that part out. It probably involves deleting the old TV screen model and creating a new one

actually I found a better method with having two screens, one with the static texture and one without. what I was gonna do is have one of them resize at quick intervals for an animation. I'm making them really close so you can't tell the difference between the two "screens"

I suggest using setSkinName() for this.  Uh, I'll look up how it works, I've used it before, for some money items and an animated texture on the back of a static shape rocket booster.

Ok, so the function is staticShape.setSkinName("name");
The name refers to part of a file name.  This was used for the clock in Map_Kitchen, and I kept it when I ported the map to v21.  If you look at my port in Map_Kitchen/addobjects/*.png, you'll see 3 files: base.LCD.png, blue.LCD.png, and green.LCD.png.  On the range clock number models, the texture for the numbers is "base.LCD".  When I use setSkinName("blue"), it swaps base.LCD for blue.LCD.

So what you'll want to do is to set the material for the screen to "base.TV".  Then add "base.TV.png" and "static.TV.png" to the folder with the .dts.

From there you can use schedules to swap between them using setSkinName();

Important
If you're going to use this in a multiplayer game, you must force the extra images into the file manifest.  This can be done by adding extra faces and materials to the model.  So add a square somewhere obscure and give it the material "static.TV", and then add another square and add "face.TV" to that.  In this way Blockland knows that it should look for, and add these images to the file manifest.  Without it, clients will not download the images, and will just see a blank white image.


For the light bulb, I'm fairly certain setting that material to "Shadeless" will make it glow.

For the death stuff just look at the script files for the original map.  It's probably doing it using a trigger zone and a list of messages.
« Last Edit: August 04, 2018, 09:43:22 PM by Tendon »


For the light bulb, I'm fairly certain setting that material to "Shadeless" will make it glow.

How would this be done? through blender or through Torquescript?

EDIT: In the zip for the original map I see no script files, could they have done this any other way?
« Last Edit: August 04, 2018, 10:22:34 PM by GreenBH³ »

Blender. Also check the .mis file I think it has script inside it

Blender. Also check the .mis file I think it has script inside it

Lol yep, there it is.