• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Npcs that act like heroes!!

Budgie_boy

A bold new journey awaits
586
Posts
19
Years
  • BE WARNED!
    This is my first tutorial, so if it is completely crap and smells like a childs bumcheek after a runny poo then close this and kill me!!!!!!!!!:P :dead:

    BEFORE WE GO ON:
    You should NOT be a Noob and should know how to make a variable and a bit of events!

    Right first of all we have to make an event, Call the event the name of the NPC(Just for easiness).

    Now in the event, there should be a "<>", double click on that and a screen should pop up.

    Click on "Variable Operation". Another screen should pop up. Click on the menu for the variables. Create a variable with the NPCs name.

    Click ok then cancel then make your event as you see fit, then you should at the end of that event make a variable operation, choose the event you made and add 1 to that variable.

    Now you can make conditional branches to make the NPC act realistically or as a Hero.

    Remember to make the conditional branches as

    "if variable [variable_name_that_you_made] == [number_that you made]
    [events_that_you_make]
    else
    [anything_you_want_to_add] or 'Erase Event'
    End

    Some screenies showing you what I mean in a while!
     

    MasaXGPMat

    Super Transcedent Milenio
    205
    Posts
    18
    Years
    • Age 33
    • Seen Feb 9, 2012
    lol budgie cool tutorial lol i like the beginning of the tut lol
     

    [_DarkDragon_]

    FireDance Trainer
    836
    Posts
    19
    Years
  • it's like programming AI XD
    I love coding AI, it's fun, you can like make a pokemon and then if it's aggressive you make it follow you and attack and stuff like that :P
     
    28
    Posts
    18
    Years
  • wtf???

    Sorry if i misinterpreted the tut, but a way easier way to do it is to go:
    (you need 2 pages)

    first page:
    Events that you make, blah blah blah blah
    set switch "talked to sailor" ON

    on page two: precondition: (the checkboxes on the left) if switch "talked to sailor" ON,
    now in the events window, whatever you want.

    A bit of basicness here:
    Switches are used for things like, once you get the first pokemon it'll turn on a switch to stop you doing it again.
    Variables are for things say, either (this one is used in place of multipe switches) you can pick seven roses from the bush, so each time you pick a rose, it adds one to the variable "roses", and once the v "roses" is equal to seven, you cant pick any more. the other way is for storing data like number of items held, map ID, X/Y coordinate, money etc.
     

    Budgie_boy

    A bold new journey awaits
    586
    Posts
    19
    Years
  • Randomjagged said:
    Sorry if i misinterpreted the tut, but a way easier way to do it is to go:
    (you need 2 pages)

    first page:
    Events that you make, blah blah blah blah
    set switch "talked to sailor" ON

    on page two: precondition: (the checkboxes on the left) if switch "talked to sailor" ON,
    now in the events window, whatever you want.

    A bit of basicness here:
    Switches are used for things like, once you get the first pokemon it'll turn on a switch to stop you doing it again.
    Variables are for things say, either (this one is used in place of multipe switches) you can pick seven roses from the bush, so each time you pick a rose, it adds one to the variable "roses", and once the v "roses" is equal to seven, you cant pick any more. the other way is for storing data like number of items held, map ID, X/Y coordinate, money etc.
    Well that is one way, however I absolutely hate using switches so I use variables, Because this allows so much more things to be done rather than using switches.

    I'm not saying don't use switches but it only the way I work! To be honest the best thing to do is to use a mixture of both switches and variables, this allows stuff like proper emotions and NPCs acting in a specific way relating to event that happen.

    So yes you could just do that thing with switches but if you want extreme artificial intellegence from the NPCs then it's best to use a mixtures of both switches and variables.
     

    [_DarkDragon_]

    FireDance Trainer
    836
    Posts
    19
    Years
  • rofl, now that you talked about extreme artificial intelligence I was imagining an NPC coming up from nowhere and whacking you with a stick, then running away :S
     

    Budgie_boy

    A bold new journey awaits
    586
    Posts
    19
    Years
  • Well if that's what you want, then you can! LOL:P

    Look all I'm trying to say is that I find it more flexible to use variables rather than switches.

    Have the above as an example of switches:
    if you have killed a NPCs brother/Sister (Switch)
    or if you killed the dad (switch)

    they come after you and whack you on the head (ending event)


    Have the above as an example of Variable:
    if you have killed a NPCs brother/Sister (=1 to variable)
    or if you killed the dad (=2 to variable)

    they come after you and whack you on the head once if variable =1
    they come after you and whack you on the head twice if variable =2 (ending event)


    There is (I find) less amount of effort needed when using variables so that's why I use them.
     
    28
    Posts
    18
    Years
  • Yeah Like if you want him to randomize what he says youd use a v but for your tut how he does something the first time you talk to him, but something different for every time after that, switches would be best.
     

    Budgie_boy

    A bold new journey awaits
    586
    Posts
    19
    Years
  • Randomjagged said:
    Yeah Like if you want him to randomize what he says youd use a v but for your tut how he does something the first time you talk to him, but something different for every time after that, switches would be best.
    Exactly, but I prefer variables for everything, anyway. I think comments should be stopped on this!
     

    halfling2

    Breakfast Squid
    197
    Posts
    18
    Years
  • Rm2k3Guy said:
    Naughty Purple Chickens? lol this is a good guide i think newbs would understand it
    [SPOIL="Or would they!"][/SPOIL]
    I'm not a n00b and don't really understand it..... well, I guess I get the idea but I don't know crap about RMXP's variable system.
    EDIT: Oh, I get it now that I read more and Budgie saying to stop commenting.[SPOIL=Me stupid.[/SPOIL]
     
    Last edited:

    Budgie_boy

    A bold new journey awaits
    586
    Posts
    19
    Years
  • halfling2 said:
    I'm not a n00b and don't really understand it..... well, I guess I get the idea but I don't know crap about RMXP's variable system.
    EDIT: Oh, I get it now that I read more and Budgie saying to stop commenting.[spoil=Me stupid.[/SPOIL]
    If you or anyone else have a problem trying to understand this or trying to use it then just drop me a PM I'll always reply to it after a few days...:D
    Always happy to help!
     
    Back
    Top