Incrasing sprite scale at certain momment?

Discuss all aspects related to modding Zandronum here.
User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

Incrasing sprite scale at certain momment?

#1

Post by Lord_of_D: » Thu Feb 07, 2013 4:52 pm

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:
Image

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: Incrasing sprite scale at certain momment?

#2

Post by Catastrophe » Thu Feb 07, 2013 5:59 pm

No, D: It's not D:

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#3

Post by Lord_of_D: » Thu Feb 07, 2013 8:04 pm

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?
Image

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Incrasing sprite scale at certain momment?

#4

Post by Ivan » Thu Feb 07, 2013 8:11 pm

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.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#5

Post by Lord_of_D: » Thu Feb 07, 2013 8:33 pm

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

Zupoman
Forum Regular
Posts: 110
Joined: Tue Jun 26, 2012 6:30 pm

RE: Incrasing sprite scale at certain momment?

#6

Post by Zupoman » Thu Feb 07, 2013 9:02 pm

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...
This signature is empty and useless, I would write another useless idiotism here but people will call me a noob for that, so sorry, no more signatures for you. Go somewhere else.

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#7

Post by Lord_of_D: » Thu Feb 07, 2013 10:04 pm

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?
Image

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#8

Post by Cruduxy » Thu Feb 07, 2013 10:18 pm

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
Last edited by Cruduxy on Thu Feb 07, 2013 10:22 pm, edited 1 time in total.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

User avatar
-Jes-
Frequent Poster Miles card holder
Posts: 975
Joined: Fri Aug 03, 2012 9:55 am
Location: Void Zone

RE: Incrasing sprite scale at certain momment?

#9

Post by -Jes- » Thu Feb 07, 2013 10:22 pm

A_JumpIfcloser(MeleeRangeHere,1)
goto myoutofrangestate
restofmyinrangestatehere

Would probably be more accurate to his question.

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#10

Post by Cruduxy » Thu Feb 07, 2013 10:24 pm

Its same as I wrote but replaced the see state >_>
Edit : See meant the melee state.
Last edited by Cruduxy on Thu Feb 07, 2013 10:25 pm, edited 1 time in total.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#11

Post by Lord_of_D: » Fri Feb 08, 2013 1:43 am

-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)
Image

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#12

Post by Cruduxy » Fri Feb 08, 2013 1:21 pm

Inherit from loreshot
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#13

Post by Lord_of_D: » Fri Feb 08, 2013 3:49 pm

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?
Image

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#14

Post by Cruduxy » Fri Feb 08, 2013 9:10 pm

No you don't have to.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: Incrasing sprite scale at certain momment?

#15

Post by Bloax » Fri Feb 08, 2013 9:23 pm

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")
[quote="Kennon Conrad"]Dear LawCounsels,
To prove your compressor works, I suggest you try it on your posts and then post only the result.

We all know an ideal lossy compressor would output 0 bytes for your posts, so see if you can beat that.

Have a nice day.[/quote]

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#16

Post by Lord_of_D: » Sat Feb 09, 2013 2:23 am

^
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:
Image

User avatar
-Jes-
Frequent Poster Miles card holder
Posts: 975
Joined: Fri Aug 03, 2012 9:55 am
Location: Void Zone

RE: Incrasing sprite scale at certain momment?

#17

Post by -Jes- » Sat Feb 09, 2013 10:15 am

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.
Last edited by -Jes- on Sat Feb 09, 2013 10:18 am, edited 1 time in total.

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#18

Post by Cruduxy » Sat Feb 09, 2013 1:29 pm

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.
Last edited by Cruduxy on Sat Feb 09, 2013 1:30 pm, edited 1 time in total.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

User avatar
Lord_of_D:
Posts a lot
Posts: 691
Joined: Sun Aug 26, 2012 5:31 am
Location: Mexico
Contact:

RE: Incrasing sprite scale at certain momment?

#19

Post by Lord_of_D: » Sat Feb 09, 2013 3:12 pm

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
Image

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: Incrasing sprite scale at certain momment?

#20

Post by Cruduxy » Sat Feb 09, 2013 3:18 pm

Because it plays a sound and spawns a couple of balls behind the actor.. which you don't need anyway
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

Post Reply