Man, I need this site a lot.

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

Moderators: marionline, SDHawk

Post Reply
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

Man, I need this site a lot.

Post by AzureGames »

How do you get an NPC to have the same X position of a character in you party during a cutscene, regardless of the X position of the hero?

(Y...you know what I'm talking about, right...?)




:???:
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 »

Here is a little example:

Code: Select all

plotscript, example script, begin
   suspend player
   walk NPC to X(5, hero x(me))
   wait for NPC(5)
   show text box(127)
   wait for text box
   resume player
end
This makes NPC 5 walk until it has the same X value as the leader
User avatar
kylekrack
Liquid Metal Slime
Posts: 1242
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

You could use "set NPC position(ID, hero x(me))" if you want it done instantaneously as well. For example, if it's done during a fade out.
My pronouns are they/them
Ps. I love my wife
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

:)

Post by AzureGames »

Thanks- Both of you!
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

Another Question...

Post by AzureGames »

Let's say I wanted to make an NPC appear next to the hero. How do I put an NPC next to my hero regardless of their original position?
;)
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

"set NPC position(ID, hero x(me), hero y(me)+1)" to make the npc appear one tile below the hero, "set NPC position(ID, hero x(me)+1, hero y(me))" to make it appear to the right, etc.
Sent from my iPhone
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

Reply

Post by AzureGames »

Taco Bot wrote:"set NPC position(ID, hero x(me), hero y(me)+1)" to make the npc appear one tile below the hero, "set NPC position(ID, hero x(me)+1, hero y(me))" to make it appear to the right, etc.
Thanks!
Post Reply