RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Actor (Name) may not = Actor #

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 86
I am trying to get the code to recognize which actor is in which slot.  I am trying to create a game in which the hero summons her allies.  Her beneficial spells can affect them but not herself and visa versa.  RPG maker does not give me a field to input what type of summoned creature is in which Actor slot.  Is there any way to define this or move them to a preset arrangement with coding?

An example:

The primary character is in slot 1.  He/She Casts a healing spell that is single cast and can only be used to heal one of her minions, not herself.  The minions have corresponding elements.  I want the animation to correspond to their element.  I can do this through a show choices command but it seems clunky.  Is there any way I can get the code to regognize that a certain elemental is not in the party and if it is that it is in a specific slot? 
What are you looking at?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
XP or 2k3?

**
Rep: +0/-0Level 86
What are you looking at?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Try this in an if statement:
Code: [Select]
$game_party.actors[POS WITH 0 AS 1ST POSITION] == $game_actors[ACTOR YOU WANT]

**
Rep: +0/-0Level 86
Thank you Falcon.  I will try it out.
What are you looking at?

**
Rep: +0/-0Level 86
I had no luck with it.  Is there any way to word it into a conditional statement.  Such as:

If the target is [Actor Name]

Else

End Branch
What are you looking at?

**
Rep: +0/-0Level 86
Any help?  Perhaps I am placing your code wrong Falcon.
« Last Edit: January 09, 2008, 07:08:57 AM by Dyew »
What are you looking at?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
If you don't even know events then I'm wasting my time trying to help you.

**
Rep: +0/-0Level 86
 know what an event is.  I am a damn good Qbasic programmer.  Unfortunately this is not Qbasic.  I ask that you have some patience with me and give me some guidance here.  Obviously you know your shit and I am in the dark.  I do know the majority of the basic commands(events) and what they do.

Before you say anything, I know Qbasic is stone age.
What are you looking at?

****
Bitch
Rep:
Level 87
Bits'n'Pixels
If he doesn't know events, you're wasting yur time?  Isn't this a help forum...to help people who need help because they don't know [whatever]

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
I gave you the code, I'm not going to walk you through every damn step of the process, if someone else wants to, they're welcome to.

*
A Random Custom Title
Rep:
Level 96
wah
I had no luck with it.  Is there any way to word it into a conditional statement.  Such as:

If the target is [Actor Name]

Else

End Branch
LOLOL

****
Bitch
Rep:
Level 87
Bits'n'Pixels
Was there.....any point to that, Moo?  Might as well have just not said anythin'...laughin' at a question in a help thread seems to defeat the entire purpose  :-\

**
Rep: +0/-0Level 86
Been reading all the events in Zorn's Rm2K tools.  Even if it is a Rm2K assist I thought I would be able to pull something.  I got nothing.  Searching this forum, others, an any other information I can dig up online.  Still looking but I have nothing and it is a day later.
What are you looking at?

**
Rep: +0/-0Level 86
Try this in an if statement:
Code: [Select]
$game_party.actors[POS WITH 0 AS 1ST POSITION] == $game_actors[ACTOR YOU WANT]

The problem here I think is that I do not understand the meaning of the code.

For instance:

Quote
<Message:> Man: You have the scroll!
1. <Message:> \n[1]: Yes, it was hard to find but I have it now.
2. <Message:> Man: Well, here is your reward.
3. <Message:> Found 150 gold!
4. <Change money:> 150, increase
5. <message:> You now have \$ gold altogether!
6. <change items:> Scroll, decrease, 1


Translates into:
1.  Show Text: Man: You have the scroll!
2.  Show Text: [Character in Hero Slot]: Yes, it was hard to find but I have it now.
3.  Show Text: Found 150 gold!
4.  Increase current currency amount by 150.
5.  Show Text: You now have [Current Currency Amount] altogether!
6.  Remove one Scroll from inventory.

I also know the conditional branch needed to lead up to this through an event and how to make that work.  I just need alittle help understanding the code Falcon gave me so I can try to make sense of it and in turn try to use it to solve my problem.  Can anyone show me which way the light switch is?  I am just starting out on RPGMaker XP from a long break between now and RPGMaker2k and am trying to tackle a problem that is byond my understanding with my current knowledge.
« Last Edit: January 10, 2008, 07:16:24 AM by Dyew »
What are you looking at?

**
Rep: +0/-0Level 86
Umm...

Would this work?


Quote
Conditional Branch: Script: \n[Actor Position] = [Actor Name]

Meaning:  If the character's name was in slot [A] was equal to the character name I input...

If that was so then that would mean that Falcon's Script was meant to be in a conditional statement and would read.

Quote
Conditional Branch: $game_party.actors[Character Postion in Party] == $game_actors[Actor Name]

Meaning:  If the actor is the party, in a position I present is not equal to a actor's name I present...

Or as a statment to move a actor around in the party while in battle?  Which is how I tried to get it to work and it failed.

Quote
Conditional Branch: If actor is in party
$game_party.actors[Actor Postion in Party] = $game_actors[Actor Name]

Which should set a actor who is a party member in a position I present as being a actor in the hame that I present.  I must be wrong here because when I tried to use the script as part of a conditional statement yet not making it the condition it would not switch the position of the members of the party for me.

Is that correct or am I still very lost?
« Last Edit: January 10, 2008, 07:58:12 AM by Dyew »
What are you looking at?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
You have it pretty right, you need to use == instead of =

**
Rep: +0/-0Level 86
Thanks bro.
What are you looking at?