Charas-Project

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

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • need...help
« previous next »
  • Print
Pages: [1]

Author Topic: need...help  (Read 1766 times)

Offline Resistance

  • Member
  • Initiate
  • *
  • Posts: 5
need...help
« on: July 03, 2007, 10:27:31 PM »
in rpg maker xp (scripting) how would you make something random like if i wanted to picklock a door how would i make it so there's a chance of failing?
edit: oh wait...is this the right place to put this topic...
Logged

Offline crunkman2000

  • Lex Luthor stole forty cakes. That's as many as four tens. And that's terrible.
  • Initiate
  • *
  • Posts: 73
(No subject)
« Reply #1 on: July 04, 2007, 03:56:25 AM »
I believe this is the right place for this.

Use a variable. This was done in 2k3, but IIRC, it can be done in XP, if you're doing this with an event.

Event: Locked Door

>FORK: if Lockpick is held
> Message: It's locked. Pick it?
> Show Choices: Yes, No
> Yes Handler
>  Call common event: Pick Locks
> No Handler
>
> Else Handler
> Locked.
>
>End

Common Event: Pick Locks
Call

*put some sounds here and animation of char attempting to pick lock*
Wait: x.x secs.
set v[###] rand. 1-10
Fork: if v[####] is >1
 Fork: if V[####] is <5
  play sound: pickfail
  show message: Failed!
  remove item: 1 Lockpick
 Fork: if v[####] is >6
 playsound:pickOK
 Show message: Success!
  *then do whatever you need to do here*

Hope that helps.

EDIT: Oh, you wanted it in scripts. Eheh...look around at sites, I'm sure someone made a lockpicking script...
Logged
Photo Sharing and Video Hosting at Photobucket

Offline Resistance

  • Member
  • Initiate
  • *
  • Posts: 5
(No subject)
« Reply #2 on: July 10, 2007, 01:17:00 AM »
hmm something is wrong sometimes it says failed then success
edit: nevermind found a solution oh and thanks for you help!
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • need...help
 

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