Embiggening a single hero?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
splendidland
Red Slime
Posts: 42
Joined: Tue Feb 19, 2013 11:06 am
Contact:

Embiggening a single hero?

Post by splendidland »

Hello! I'm currently working on a part of my game where you get a party member who is quite tall, and I want to use the Large Sprites script on them and only them. I currently have a script in my game for making only a single NPC big that has arguments for the NPC to be enlarged and what hero graphic it should use, I need a script that'd have those same arguments but it doesn't seem to work for heroes.

Code: Select all

plotscript,embiggen npc,npcToGet,herographic,begin
variable(npcSliceHandle)
variable(npcInterim)
npcInterim := get NPC slice(npcToGet)
npcSliceHandle := lookup slice(sl:walkabout sprite component, npcInterim)
trace value(get sprite set number(npcSliceHandle))
replace hero sprite(npcSliceHandle,herographic)
realign slice(npcSliceHandle,edge:center,edge:bottom,edge:center,edge:bottom)
end
Can anybody help me with this? Thank you very much in advance!
Last edited by splendidland on Tue Jan 10, 2017 10:19 am, edited 2 times in total.
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

I think you could probably limit the embiggening to a specific hero ID by using an if then statement. Like do a for loop through your party member slots, and do "if hero ID == 2 then (embiggening stuff)" on each slot .

I'd type up a real example but work's been crazy. :(
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

The <a href="https://rpg.hamsterrepublic.com/ohrrpgc ... ites">walk tall</a> example scripts work for heroes.

You just need to make sure that you only embiggen the one hero that is supposed to be bigger

Code: Select all

script, embiggen a specific hero, begin
  variable&#40;hero, sl, hero id&#41;
  for&#40;hero, 0, 3&#41; do&#40;
    hero id = hero by rank&#40;hero&#41;
    if&#40;hero id == hero&#58;the big one&#41; then&#40;
      sl &#58;= get hero slice&#40;hero&#41;
      embiggen walkabout slice&#40;sl&#41;
    &#41;
  &#41;
end 
Post Reply