Jump to content
  • 0

Texture changes when picking up an Item.


Kesky

Question

Posted (edited)

I'm making a map based around a traffic jam and I want to make the cop cars mean there's an item at its back. How I wanted to indicate this is have its police lights flashing until the item is collected then they shut off. What I want to do to represent this is to change the textures from On to Off on the lights until the item is collected. Does anyone have ideas on how to pull this effect off. I'm not comfortable enough with ACS to really know how to do it. I'm on GZDoom if that helps.

Edited by Kesky
Specifying

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

Howdy! ๐Ÿ™‚ Using SetLineTexture, ChangeFloor, Delay,ย Restart andย ACS_NamedTerminate I made an example map showing how I might do it. First make a script that is triggered when the level is loaded. This script will change the texture on the tagged lines between two textures (on/off). In my example I've made two lights on top of the car that alternate between red and blue. This script loops until the thing behind the car is picked up (A shotgun in my example). Secondly give the thing behind the car action 80 Script Execute so it runs a script when it's picked up. This script terminates the open script then changes the textures one last time. There is probably a bunch of better ways to do it but I hope this helps. ๐Ÿ™‚

TextureChangeExample.zip

ย 

Also if you want to learn ACS check out Chubzdoomer on youtube. ๐Ÿ™‚

Share this post


Link to post
  • 0
Posted (edited)
4 hours ago, JaySmithen said:

Howdy! ๐Ÿ™‚ Using SetLineTexture, ChangeFloor, Delay,ย Restart andย ACS_NamedTerminate I made an example map showing how I might do it. First make a script that is triggered when the level is loaded. This script will change the texture on the tagged lines between two textures (on/off). In my example I've made two lights on top of the car that alternate between red and blue. This script loops until the thing behind the car is picked up (A shotgun in my example). Secondly give the thing behind the car action 80 Script Execute so it runs a script when it's picked up. This script terminates the open script then changes the textures one last time. There is probably a bunch of better ways to do it but I hope this helps. ๐Ÿ™‚

TextureChangeExample.zip

ย 

Also if you want to learn ACS check out Chubzdoomer on youtube. ๐Ÿ™‚

I just took a look at the code and this looks like it definitely works for what I need. Thank you. The only issue I really see is that the lineID is hard coded in which would make it harder to replicate multiple times over a map. This feels like it should be an easy fix however. What I will try to do is make arg 1 and 2 on the gun the lineID's it effects. Short of that I may make a list in the code of all the lineID's. That much I think I can learn to work out. Thank you for your help my man I appreciate it. I've looked through chubz's channel and he's a great teacher, I'm just very slow learning code from scratch. Thanks again my friend.

ย 

Edit: After a look through on how arrays work the solution ive come up with is to make a dynamic array with every lineID thats flashing. Then the item has its connected line ID's passed through via arg's. When it is it goes through the shotgun script and pops those 2 from the array. Now I just have to implement that and see if it works.

Edited by Kesky

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...