User Tag List

Results 1 to 6 of 6

Thread: add-on to Joe's random movement script?

  1. #1
    Octorok Beta Link's Avatar
    Join Date
    Jan 2007
    Age
    31
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,128
    Level
    11
    vBActivity - Bars
    Lv. Percent
    53.64%

    add-on to Joe's random movement script?

    Ok, so lately I've been working on level 2's boss in Island of Dreams. I was looking for a random movement script for the boss itself, and I found one! The only problem is that when I was testing it by linking the boss FFCs to the script FFC, the boss would always move off the screen sooner or later. I need a way to make it stay inside the screen. Can anyone help me with this?

  2. #2
    Octorok
    Join Date
    Jan 2008
    Age
    32
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    942
    Level
    10
    vBActivity - Bars
    Lv. Percent
    65.41%

    Re: add-on to Joe's random movement script?

    Well, is your boss only 1 tile wide or is it bigger? Because if it is bigger, you'll need to modify those lines:
    if(this->X < 8){
    if(this->X > 248){
    if(this->Y < 8){
    if(this->Y > 168){
    8, 248 and 168 need to be others numbers if I clearly understand the script itself.
    And maybe those lines also need to be changed:
    this->X = (Rand(240)+8);
    this->Y = (Rand(160)+8);
    160 and 240 might have to be changed...

  3. #3
    Octorok Beta Link's Avatar
    Join Date
    Jan 2007
    Age
    31
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,128
    Level
    11
    vBActivity - Bars
    Lv. Percent
    53.64%

    Re: add-on to Joe's random movement script?

    Yeah, the level 2 boss is going to be 3x3 combos. I'll try changing the script now...

    Edit: Ah! Your solution wasn't correct, lucas, but it led me to realize what I had to do! Near the top, where it told the engine to put the ffc on a random spot on the screen (this->X = (Rand(240)+8);
    this->Y = (Rand(160)+8); ), I had to replace those random values with the values that are equal to where I put the boss itself. The script FFC had been spawning in a place on the screen completely different than the boss FFCs, and the script only affected the Script FFC! So the Script FFC now acts as a sort of 'core' to the boss. Sorry if it seems like I'm rambling.

    You are still partially right, about having to change these lines:
    if(this->X < 8){
    if(this->X > 248){
    if(this->Y < 8){
    if(this->Y > 168){
    That's the controlled area Joe mentioned in his topic title.

  4. #4
    Octorok
    Join Date
    Jan 2008
    Age
    32
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    942
    Level
    10
    vBActivity - Bars
    Lv. Percent
    65.41%

    Re: add-on to Joe's random movement script?

    Nah, it's alright, I wasn't expecting to have the good answer. I just gave you ideas and you made it work so it's all fine. :)

  5. #5
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,307
    Level
    26
    vBActivity - Bars
    Lv. Percent
    9.24%

    Re: add-on to Joe's random movement script?

    Ah well, I'm glad this has come in handy =)

    When I wrote it, I thought to myself that it'd be worth posting, incase someone wanted to use it for a custom boss one day.

  6. #6
    Octorok Beta Link's Avatar
    Join Date
    Jan 2007
    Age
    31
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,128
    Level
    11
    vBActivity - Bars
    Lv. Percent
    53.64%

    Re: add-on to Joe's random movement script?

    Oh yes, it certainly did come in handy. Thank God for you Joe, at least half the scripts in Island of Dreams were made by you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social