1
General Discussion / Creating a Skip Level Item
« on: October 22, 2022, 12:38:35 AM »
Hi guys - so I have this custom item I want to use. Basically it's the ability to bribe one of the big boss's henchmen to let you skip some of the levels:
You collect a lot of cash in my game, and there's these tank, train, and airship levels - three of each - that block your path but aren't part of the numbered levels, and tend to be harder. So I thought it'd be neat to be able to skip them for $500. Everything functions fine like I'd expect, except one issue: if you play the level legitimately, and then re-enter it, I want that item gone - and the NPC too, if I can.
I was looking for a command along the lines of "if course complete" but found nothing, and my experiments with that failed. The I thought I could have a variable made by a command just before the level exit, then added a command in the item's "create" area:
if game var skip = 1
{
remove item 46
}
Item 46 being that Skip Level for sale. This command did nothing, not sure if I used the right syntax. I also tried using that command in the individual item placed in the level (which I realized I might need to do anyway, since each skippable level would need its own variable). Anybody know how I can make this item and NPC disappear for replays after the level they're in is completed, whether the player played or paid?
You collect a lot of cash in my game, and there's these tank, train, and airship levels - three of each - that block your path but aren't part of the numbered levels, and tend to be harder. So I thought it'd be neat to be able to skip them for $500. Everything functions fine like I'd expect, except one issue: if you play the level legitimately, and then re-enter it, I want that item gone - and the NPC too, if I can.
I was looking for a command along the lines of "if course complete" but found nothing, and my experiments with that failed. The I thought I could have a variable made by a command just before the level exit, then added a command in the item's "create" area:
if game var skip = 1
{
remove item 46
}
Item 46 being that Skip Level for sale. This command did nothing, not sure if I used the right syntax. I also tried using that command in the individual item placed in the level (which I realized I might need to do anyway, since each skippable level would need its own variable). Anybody know how I can make this item and NPC disappear for replays after the level they're in is completed, whether the player played or paid?