Melonpizza Posted June 9, 2021 hello, while i was making a replacment for the plasmagun, i stumbled across a problem. when it goes to ready (not exactly, but still..) it creates big lag (90% from 25gb of ram in 15 seconds), and therefore i thought you guys can help me. This is the weapon with its nessesary components, if needed: (the "fire" state is a nightmare, but you will undersdand it if you code in decorate) actor greekflamethrower : weapon replaces PlasmaRifle 6778 { Weapon.selectionorder 1600 weapon.ammouse 20 Weapon.ammogive 120 WEAPON.ammotype "GreekFlame" Weapon.slotnumber 2 scale 0.10 states { spawn: GFTP ABCDEFGH 3 loop select: GRFT A 1 a_raise loop fire: GRFT A 0 a_checkforreload(10,"realfire",false) PTBR B 0 a_overlayflags(-2,pspf_addweapon|PSPF_RENDERSTYLE,true) PTBR B 0 a_overlayflags(-3,pspf_addweapon,true) PTBR B 0 a_overlayflags(-4,pspf_addweapon,true) GFTL B 0 a_overlayrenderstyle(-2,STYLE_Translucent) GRFT B 0 a_clearoverlays(-4,-2,true) GRFT A 5 a_weaponoffset(0,-30,wof_add|wof_interpolate) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 3 GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 2 a_weaponoffset(-4,0,wof_add) GRFT A 0 GRFT A 2 a_weaponoffset(4,0,wof_add) GRFT A 3 GRFT B 0 a_overlay(-4,"reloadinghand",false) GRFT B 6 a_overlayoffset(-4,-40,-30,wof_add|wof_interpolate) GRFT B 5 GRFT B 6 a_overlayoffset(-4,40,30,wof_add|wof_interpolate) GRFT B 3 a_resetreloadcounter GRFT B 0 a_clearoverlays(-4,-2,true) goto ready realfire: GRFT A 4 a_weaponoffset(-60,-30,wof_add|wof_interpolate) GRFT A 1 a_firecustommissile("greekflameattack",0,true,0,6) GRFT A 4 a_weaponoffset(-60,-30,wof_add|wof_interpolate) GRFT A 3 a_refire goto ready Deselect: GRFT B 0 a_clearoverlays(-4,-2,true) GRFT A 1 a_lower loop ready: GRFT A 1 a_overlay(-4,"Bowlfire1",false) PTBR B 0 a_overlayflags(-4,pspf_addweapon,true) goto "realready" realready: GRFT A 1 a_weaponready loop reloadinghand: GTRH A 1 a_overlay(-3,"bowlfire2",false) GFTL B 1 a_overlay(-2,"bowl2",false) wait bowlfire2: GFTL B 1 wait bowl2: GFTT B 1 loop bowl1: GFTT A 1 loop Bowlfire1: GFTL A 1 a_overlay(-2,"bowl1",false) GFTL B 0 a_overlayflags(-2,PSPF_RENDERSTYLE,true) GFTL B 0 a_overlay(-3,"bowlfirebubble",false) wait bowlfirebubble: LRAF A 60 GTLB AB 7 loop } } actor GreekFlame : ammo 3457 { inventory.icon "GFTAA0" inventory.pickupmessage "$%got roast material!" inventory.amount 160 inventory.maxamount 160 ammo.backpackamount 160 ammo.backpackmaxamount 600 scale 0.10 states { spawn: GFTA A -1 stop } } actor GreekFlameattack { +nogravity +noblockmap states { spawn: LRAF A 0 a_die(none) stop death: LRAF A 1 a_spawndebris("GREEKFLAMEPARTICLES",false,0.5,1.5) stop } } actor GREEKFLAMEPARTICLES { Health 50 Radius 5 Height 5 States { Spawn: BVLD A 100 goto death death: LRAF A 0 a_explode(25,10,false,true,0,0,0,"Bulletpuff","fire") stop } } 0 Quote Share this post Link to post
jaeden Posted June 9, 2021 (edited) My guess: At end of Bowlfire1: GFTL B 0 a_overlay(-3,"bowlfirebubble",false) wait You have "wait" after a 0 duration frame. Wait does repeat that frame, and since it has duration 0, game will probably get infinitely stuck here. You need to set that frame duration to higher number, or change the "wait" to something else. Edited June 9, 2021 by jaeden 3 Quote Share this post Link to post
Melonpizza Posted June 10, 2021 One more thing, the transprency thing isnt working (pspf_renderstyle aswell as a_overlayrenderstyle are shown as plain text in slade) PTBR B 0 a_overlayflags(-4,pspf_addweapon,true) GFTL B 0 a_overlayrenderstyle(-2,STYLE_Translucent) 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.