Jump to content

What's Wrong with this Script?


blyegg
 Share

Recommended Posts

I used the following code to try and do a simple chapter, just load ally units, load enemy units, and make the game progress after all enemies were beaten. I've done this before, but I can't figure out what I've done wrong in this one.

[spoiler=The Script Thingy]//Made by markyjoe1990 of Youtube

//Modified by Nintenlord

#define DISABLE_TUTORIALS
#include EAstdlib.event

EventPointerTable(0x06,Pointers)


ORG 0xD80000
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN TrapData TrapData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event

Bad:
UNIT 0x87 0x3D 0x00 Level(1, Enemy, 0) [19,19] [16,1] [0x02] Guard
UNIT 0x3E 0x1D 0x87 Level(1, Enemy, 0) [18,9] [8,8] [0x4D] PursueWithoutHeed
UNIT

Good:
UNIT 0x01 0x40 0x00 Level(1, Ally, 0) [19,19] [19,19] [0x6C] NoAI
UNIT 0x02 0x2D 0x01 Level(1, Ally, 0) [19,19] [18,19] [0x4A] NoAI
UNIT 0x03 0x3B 0x01 Level(1, Ally, 0) [19,19] [19,18] [0x1F] NoAI
UNIT

Turn_events:
OpeningTurnEvent(Opening_event)
END_MAIN

Character_events:
END_MAIN

Location_events:
END_MAIN

Misc_events:
CauseGameOverIfLordDies
DefeatAll(Opening_event)
END_MAIN

Opening_event:
LOU1 Good
ENUN
LOU1 Bad
ENUN
ENDA

Ending_event:
MoveToChapter(0x07)
ENDA

TrapData:
ENDTRAP


MESSAGE Events end at offset currentOffset

//The map for this chapter is at offset: 01000000

Watch, it's a misplaced comma.

Oops, i fail, i forgot to say what went wrong:

What happened was that the 3 units i had appear disappeared and around them and where they were, the tiles glitched, the game froze.

Also, the Event Assembler gave me no errors.

post-8398-0-32475500-1373486374_thumb.png

Edited by BlueWyvern4
Link to comment
Share on other sites

Umm you have [19,19] in most of the units, but the map that's in the picture is 15 x 10.......

It's a custom map, they're in the corner. Here's a pic of the map:

EhNPMBs.png

20x20

Edited by BlueWyvern4
Link to comment
Share on other sites

DefeatAll(Opening_event)

should this point to the ending event? (not entirely sure how your problem came up etc. so if not a little extra info might help)

Level(1, Enemy, 0)

I prefer to not have spaces and use "True" or "False" instead of "1" or "0", assuming the latter two even work *shot*

Link to comment
Share on other sites

Umm what Blazer said, I also don't know what this is:

Turn_events:

OpeningTurnEvent(Opening_event)

END_MAIN

pretty sure it should be:

TurnEventPlayer(0x00,Opening_event,0)

I've never used the "make a turn event for the opening event" thing though so idk.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...