Scripts / Bleeding Wall

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 26th Aug 2019 18:56
Hi all,

I am trying to create the effect if blood spreading down a wall. I made this script and attached it to a blood decal:




The decal gets scaled up in the editor but not in Test mode. Can someone please give me advice.

Thanks.
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 26th Aug 2019 20:00
Firstly the object Id is given by g_Entity[ e ].obj
Secondly You probably want to scale in Y. Z is depth for a decal!
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 26th Aug 2019 20:05
Thanks. But it seems to scale in the right direction in the editor. I am wondering whether it just doesn't work in realtime…?/
Julian - increasingly disillusioned and jaded
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Aug 2019 20:41 Edited at: 26th Aug 2019 20:43
what you're seeing in the editor is an animation - if the decal already has an animation that works you could just use that and reduce the speed as needed in the properties panel
or via script with
ModulateSpeed(e,v)
v = 0 -- stop
v = 1 --normal speed (same as editor)
v = 2 --2x as fast

p.s. pretty sure GG uses
Scale(e,x,y,z)
not
ScaleObject(obj,x,y,z)

p.p.s why are you hiding and showing the object in the script? this is unnecessary work
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 26th Aug 2019 20:46
Scale(e, v) scales in all dimensions by v.
ScaleObject (which sounds like one of my additions) allows scaling in all dimensions separately.
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 26th Aug 2019 22:11
Thanks. I am not aware that the decal has an animation but I will check. It's just one of the stock decals. I think it's in Fixtures.

Quote: "why are you hiding and showing the object in the script? this is unnecessary work "


This was just an attempt to get it to work. I was hoping it would reset the image or something.
Julian - increasingly disillusioned and jaded
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Aug 2019 22:50
oh yes, didn't notice that new addition
@lordjulian, did you mean scaling with the widget? i think i misunderstood, i thought you were saying it was scaling during the editor like the script was running.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 27th Aug 2019 07:09
No. I would go into Test mode and nothing would happen but when I exit Test mode I see that the decal is rescaled.
Julian - increasingly disillusioned and jaded
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Aug 2019 17:35
i see what you mean, you need to turn physics off to fix it
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Aug 2019 18:44
Aha, I've noticed that default settings for some decals have physics on, which to me is ridiculous, the default should be physics off for decals.
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 29th Aug 2019 12:14
OK. I'll try that. Thanks.
Julian - increasingly disillusioned and jaded
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 29th Aug 2019 12:35
I set physics off and dynamic still on. Still not working. Here's the latest version:
Julian - increasingly disillusioned and jaded
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Aug 2019 15:37
try put it in the script like mine then, my script works fine for me
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Aug 2019 16:30
This works fine for me, even with physics 'on' for the decal. (I used a flame decal to test it)

Must be something peculiar about the decal you are using.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 29th Aug 2019 20:14
Cool! Thank you both very much! It is working and now my walls will bleed.
Julian - increasingly disillusioned and jaded
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 7th Sep 2019 14:49
cool i tesed it too and it works great.. but where can i take some animated blood decals?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 7th Sep 2019 20:44
I used an unanimated one from fixtures. I think I will look for a better one though.
Julian - increasingly disillusioned and jaded
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 7th Sep 2019 21:41
Quote: "I used an unanimated one from fixtures. I think I will look for a better one though."


I TRIED with that one too but with on resutlts.. but worked fine with fire anmated decal

did you set somenthing in the fpe of the blooddecal?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 8th Sep 2019 09:54
No. I didn't edit that. BTW, I'm using SmallG's version of the script.
Julian - increasingly disillusioned and jaded
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 8th Sep 2019 10:10
Quote: "No. I didn't edit that. BTW, I'm using SmallG's version of the script."

sorry but i cannot managed it to work could you please post the script??
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM

Login to post a reply

Server time is: 2024-12-22 08:58:19
Your offset time is: 2024-12-22 08:58:19