Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Giv Me tEh SniPpetz

Author
Message
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 28th Oct 2003 06:17
hehe sorry bout the title, just wanted to do it. Anyway i been trying to make a basic d20 rolling system in dbc, i got one sorta workin the way i want it, but its very sloppy, as you can see here

i think thats the one that worked, anyway does anyone have a snippet for dice rolling, doesnt have to be d20 i can edit the code to make it d20, so any dice roller would be good.

Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 28th Oct 2003 06:46
Just add up random numbers of the quantity of the dice... a 6, 12, and 20 would be

rnd(5)+1
and
rnd(11)+1
and
rnd(19)+1

--Mouse: Famous (Avatarless) Fighting Furball

A very nice %it, indeed.
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 28th Oct 2003 14:24 Edited at: 28th Oct 2003 14:31
whoa, hang on, i treid that code i compiled again and it turns out its nto as sloppy as i thought. cool, next step to make a battle system for it. any suggestions on how i should set it up? like have it say press r to attack then say you rolled x#, then say if x#= >12 print success, if x#=<12 then print fail. that sound slike i can work it, but just tryin to figure out how id set it up into proper code, it's late and i just saw one of the worstest movies ever freddy vs jason so im not in a thinking mood.

[edit] mayb ei can think, her eis a sample i just fixed up to make it more working,


i put in the wait comman dcause if you press the r button for a little longer than it wants it will skip and cls too fast, so atleast this keeps it clean. i think, i cant test it much cause some reason it makes winamp stop makign sound when i close the test window. anyway back to work on the battle system

Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 28th Oct 2003 14:43 Edited at: 28th Oct 2003 15:12
ok i wrote one up real quick, in theory it should work, but instead when i run it it flashes and keeps sayin i fail to hit. bastards. someone tell me where im wrong...


hah aholy crap, i just took a test photo for use in my battle system, check it out im totally a jedi, i even have 70's style mark hamil hair cut! thats what i get for not brushing after my shower :/


OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th Oct 2003 15:30
RUN AWAY!


Avatar & Logo by Indi. Insert witty comment here...
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 28th Oct 2003 15:55 Edited at: 28th Oct 2003 15:58
Hmmm, I can't see why your using '#' with your variables, '#' denotes a real number like 3.13415, try taking out all those #'s and see if it prefers that - like:

EDIT! - Spotted the bug...




As for your picture, well I'd say you look far more like a young Ian Brown than any Jedi I've seen .


Van-B

Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 28th Oct 2003 16:11 Edited at: 28th Oct 2003 16:14
hehe ok well i dont know what thebug was, but when i ran the code you gave it kept saying zeor damage, cause you forgot to get rid of the # on damage, btu i've fixed it and a few other bits, now it runs good.
[edit] oops just read your little rem line, and yeah i see what it was. ohwell all working now thanks van. could use this sort of engine to run the battles on the dark phantasy game, atleast a more advanced version. By the by, any mor ework on the syndicate game yet?


Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 28th Oct 2003 16:14
Ahh, cool

The bug was because on every loop it would check the roll variable, I just changed it so that it only checks the roll variable if you press R, after it gives it a random number.


Van-B

Login to post a reply

Server time is: 2024-11-24 02:33:35
Your offset time is: 2024-11-24 02:33:35