Page 1 of 2
Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 4:52 pm
by Lord_of_D:
im working on a "emotive" guest for our fav game and i want what, in a certain momment, it incrase the scale of the sprite, is that possible whitow scripts? D:
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 5:59 pm
by Catastrophe
No, D: It's not D:
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 8:04 pm
by Lord_of_D:
Catastrophe wrote:
No, D: It's not D:
too bad. something what i forgot to ask too: theres an action alike "A_JumpifCloser" but to jump to an state when the target is out of melee range?
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 8:11 pm
by Ivan
A_SetScale doesn't exist in Zandronum yet I'm afraid. Best method is to spawn a bigger/smaller variety of that certain object after specific delays.
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 8:33 pm
by Lord_of_D:
Ivan wrote:
A_SetScale doesn't exist in Zandronum yet I'm afraid. Best method is to spawn a bigger/smaller variety of that certain object after specific delays.
yeah, maybe incrasing the sprites size with paint or something like that and making them as another "letter"(AKAM D/C/E/G) may work.
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 9:02 pm
by Zupoman
You can use TEXTURES lump to resize them, if you are too lazy to use an outside graphic editor.
And yes, you can just draw other sprites in moments where you want something to be smaller or bigger...
It actually depends WHEN you want this to happen...
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 10:04 pm
by Lord_of_D:
Zupoman wrote:
You can use TEXTURES lump to resize them, if you are too lazy to use an outside graphic editor.
And yes, you can just draw other sprites in moments where you want something to be smaller or bigger...
It actually depends WHEN you want this to happen...
cool, but what about my second question? about if theres an action alike "A_JumpifCloser" but to jump to an state when the target is out of melee range?
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 10:18 pm
by Cruduxy
Does
A_JumpIfcloser(MeleeRangeHere,"See")
Rest of your stuff here
suffice?
Edit : If for zdoom you'd like to check
http://zdoom.org/wiki/A_JumpIfTargetOutsideMeleeRange
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 10:22 pm
by -Jes-
A_JumpIfcloser(MeleeRangeHere,1)
goto myoutofrangestate
restofmyinrangestatehere
Would probably be more accurate to his question.
RE: Incrasing sprite scale at certain momment?
Posted: Thu Feb 07, 2013 10:24 pm
by Cruduxy
Its same as I wrote but replaced the see state >_>
Edit : See meant the melee state.
RE: Incrasing sprite scale at certain momment?
Posted: Fri Feb 08, 2013 1:43 am
by Lord_of_D:
-Jes- wrote:
A_JumpIfcloser(MeleeRangeHere,1)
goto myoutofrangestate
restofmyinrangestatehere
Would probably be more accurate to his question.
can you give me an example? i kinda understand this, but not sure how to write it D:. btw, whats the full code of the lore master chain attack? i want to do something alike the "grab" it does, but i have no idea hows the code D: (it doesnt tells in zdoomwiki the actual "grab" code)
RE: Incrasing sprite scale at certain momment?
Posted: Fri Feb 08, 2013 1:21 pm
by Cruduxy
Inherit from loreshot
RE: Incrasing sprite scale at certain momment?
Posted: Fri Feb 08, 2013 3:49 pm
by Lord_of_D:
Cruduxy wrote:
Inherit from loreshot
Code: Select all
ACTOR LoreShot native
{
ConversationID 97, -1, -1
Speed 20
Height 14
Radius 10
Projectile
+STRIFEDAMAGE
Damage 2
MaxStepHeight 4
SeeSound "loremaster/chain"
ActiveSound "loremaster/swish"
action native A_LoremasterChain();
States
{
Spawn:
OCLW A 2 A_LoremasterChain
Loop
Death:
OCLW A 6
Stop
}
}
i most use the "action native" crap?
RE: Incrasing sprite scale at certain momment?
Posted: Fri Feb 08, 2013 9:10 pm
by Cruduxy
No you don't have to.
RE: Incrasing sprite scale at certain momment?
Posted: Fri Feb 08, 2013 9:23 pm
by Bloax
Lord_of_D: wrote:can you give me an example? i kinda understand this, but not sure how to write it
Code: Select all
TNT1 A 0 A_JumpIfcloser(MeleeRangeHere,"State")
If you for some reason don't know pseudocode variable references (fancy schmancy name I just gave it isn't it), then "MeleeRangeHere" is literally the MeleeRange that you set.
So if you have
Code: Select all
Actor Blah {
MeleeRange 48
...Blahblah
Blah.. }
You'd do
Code: Select all
TNT1 A 0 A_JumpIfcloser(48,"State")
RE: Incrasing sprite scale at certain momment?
Posted: Sat Feb 09, 2013 2:23 am
by Lord_of_D:
^
ok, i'll give it a try and see if it works the way i want it, thanks.
Cruduxy wrote:
No you don't have to.
then what?, the "A_Loremasterchain"? D:
RE: Incrasing sprite scale at certain momment?
Posted: Sat Feb 09, 2013 10:15 am
by -Jes-
Cruduxy wrote:
Its same as I wrote but replaced the see state >_>
Edit : See meant the melee state.
The difference is context, really. Yours has the "if closer" result in the jumped to state, mine has "if not closer" in the jumped to state. Essentially just the following mockup with the results of each state flipped. As said, it's only more 'accurate' to his question, not more correct as both are fine methods.
Lord_of_D: wrote:
can you give me an example?
Missile:
BADG E 2 a_jumpifcloser(512,1)
goto MissileSnipe
BADG FFFF 2 A_fireinaccuratebullet
BADG E 2
goto See
MissileSnipe:
BADG E 6
BADG F 6 A_fireaimedbullet
BADG E 6
goto See
In this mockup (with wholly nonexisting functions), my BADGUY tries to do a ranged attack. If he's within 512, his missile state skips the goto and continues down to the 4 quick frames that each trigger an inaccurate (hipfire) bullet.
If he's NOT within 512 of his target, he instead follows the goto to the MissileSnipe state, where he spends a lot of time to fire one more accurate bullet.
Net result: if he's close, he sprays you. If he's far away, he snipes at you.
RE: Incrasing sprite scale at certain momment?
Posted: Sat Feb 09, 2013 1:29 pm
by Cruduxy
You still don't have to use that function\action...
Edit : If you actually opened it on the wiki you'd have known why you don't need it.
RE: Incrasing sprite scale at certain momment?
Posted: Sat Feb 09, 2013 3:12 pm
by Lord_of_D:
Cruduxy wrote:
You still don't have to use that function\action...
Edit : If you actually opened it on the wiki you'd have known why you don't need it.
i did and idk why, please explain me master :3
RE: Incrasing sprite scale at certain momment?
Posted: Sat Feb 09, 2013 3:18 pm
by Cruduxy
Because it plays a sound and spawns a couple of balls behind the actor.. which you don't need anyway