Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • I'm trying to make a steal system, but it won't work...
« previous next »
  • Print
Pages: [1]

Author Topic: I'm trying to make a steal system, but it won't work...  (Read 2151 times)

Offline tutti

  • Member
  • Initiate
  • *
  • Posts: 14
I'm trying to make a steal system, but it won't work...
« on: March 13, 2006, 09:34:57 PM »
I have a skill that turns on a switch. I also have a common event set to auto-run with the switch as the trigger switch, that has all the coding of the skill. However, when I use the skill in battle (no, it's not set to allow field use), nothing happens. If I turn on the switch through an event outside of battle, or use the skill on the field, it works, but that's not quite what I'm looking for. I've looked through everything, I can't really see what's wrong.

Switches used: [0001: Steal Item], [0002: Steal Success], [0003: Steal Item Chance], [0004: Item to Steal]
Common event: Steal Item; Trigger: Auto-Start; Trigger switch: Steal Item

<>Message: Thieving in process...
<>Variable oper: [0002: Steal Success] set, Rnd [1 - 100]
<>Branch if var [0002: Steal Success] is V[0003] Less
- <>Message: Success!
- <>Variable oper: [0003: Steal Item Chance] Set, 0
- <>Change items: V[0004] add
- <>
: Else handler
- <>Message: Failure...
- <>
: End
<>Switch operation: [0001: Steal Item] OFF
<>
Logged

Offline WarxePB

  • Action Sue
  • Royal
  • *
  • Posts: 3,601
  • What killed the dinosaurs?
    • The Gigaverse
(No subject)
« Reply #1 on: March 13, 2006, 09:40:01 PM »
Parallel Process and Auto-Start Common Events don't run in battle. To make your system work, you'll have to set the event to Call, then call it from the steal event in-battle.
Logged
Blog: The Gigaverse
Twitter: Initial Chaos

Offline tutti

  • Member
  • Initiate
  • *
  • Posts: 14
(No subject)
« Reply #2 on: March 13, 2006, 09:42:52 PM »
Ah, I see. Thank you ^_^
Logged

Offline Raen Ryong

  • Skyrunner of Dragonia
  • Associate
  • *
  • Posts: 130
  • Raen Ryong... Skyrunner. Dragonic Soveriegn entity...
(No subject)
« Reply #3 on: March 13, 2006, 09:43:35 PM »
It tends to only work in battles, using the DBS I'm assuming, if it's set as a separate skillset (IE from the Battle Setting tab in the Database), and then for every monster group have a battle event, where its trigger is when that battle skillset is used. You know what I mean? Battle events are fairly volatile and calling common events from in-battle doesn't always work.

Quote
Switches used: [0001: Steal Item], [0002: Steal Success], [0003: Steal Item Chance], [0004: Item to Steal]
Common event: Steal Item; Trigger: Auto-Start; Trigger switch: Steal Item

<>Message: Thieving in process...
<>Variable oper: [0002: Steal Success] set, Rnd [1 - 100]
<>Branch if var [0002: Steal Success] is V[0003] Less
- <>Message: Success!
- <>Variable oper: [0003: Steal Item Chance] Set, 0
- <>Change items: V[0004] add
- <>
: Else handler
- <>Message: Failure...
- <>
: End
<>Switch operation: [0001: Steal Item] OFF
<>[/B]


I doubt that's all of the code, as variable number 3 is 0 at the moment... there's nothing there that defines it. Therefore, the steal has a 0% chance of success.

EDIT: Beaten...
Logged
Raen Ryong...
Skyrunner of Dragonia...
Guardian of all worlds...

Hoard and covet not, but be brave and free. Quest always after knowledge and slowly learn to know what science cannot see. Seek and strive for learning, be temperate and wise, for skill and wisdom only will help us to survive.

Offline tutti

  • Member
  • Initiate
  • *
  • Posts: 14
(No subject)
« Reply #4 on: March 13, 2006, 09:56:10 PM »
The variables are set in the monster group tab. The point is that every battle can have an item you can steal, and the chance of stealing that item depends on the battle. I don't count that as part of the code, but that's just me.

Anyway, I don't really understand what you're saying above the quote -_-
Logged

Offline Raen Ryong

  • Skyrunner of Dragonia
  • Associate
  • *
  • Posts: 130
  • Raen Ryong... Skyrunner. Dragonic Soveriegn entity...
(No subject)
« Reply #5 on: March 13, 2006, 09:59:11 PM »
Hey, don't worry. I was just mentioning that variable number 3 would be 0, given only that coding. It's fine if you've set it in the monster group tab :D
Logged
Raen Ryong...
Skyrunner of Dragonia...
Guardian of all worlds...

Hoard and covet not, but be brave and free. Quest always after knowledge and slowly learn to know what science cannot see. Seek and strive for learning, be temperate and wise, for skill and wisdom only will help us to survive.

Offline tutti

  • Member
  • Initiate
  • *
  • Posts: 14
(No subject)
« Reply #6 on: March 13, 2006, 10:02:23 PM »
Okay. Well, thanks anyway. I wasn't really expecting an answer until tomorrow >_>

Though, to me, tomorrow is in 15 minutes, but meh. I'm going to bed. Thanks for your help, both of you :)
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • I'm trying to make a steal system, but it won't work...
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum