logo
Search:

Login:


Forgot Details? Sign-up

forum >> Programming questions >> PHP / MySQL

un-draggable dice

Posted Feb 25 2012 at 9:37 AM by
Jonathan Pohlner (turtlewolf)
I'm working on a new game... you can view the working demo @ CutNEdge.info.
The part I'm concerned with right now is dragging the character dice, after a character's health has fall-in below zero. If the page is loaded directly, or reload after you're on it, it'll work fine, but when I use a $("#bigDIV").ajax("create_character_form");
the dice become un-draggable until I refresh the page... any suggestions on what I should be checking.
If that looks like an incomplete URL...I am using the code igniter framework.
AuthorMessage
Andy
Posted: Feb 25 2012 kl. 10:37 PM

That's a really cool idea you've got there, and the draggable dice are pretty slick. However, I'm not sure it's worth the effort it's going to take to make this work.

First, I can't get past the assignment screen. I can assign a die roll to each characteristic, but I'm having a devil of a time getting a second die to attach to an attribute, so I can't get past the screen.

Oooooh. I see now. Nothing should have a second die, and health gets a die roll too. I think you should have made that more clear. It's a bit frustrating that your dice will blank out previous rolls. Consider putting the original dice beside the attributes rather than on top. That way you don't guarantee as many flyovers.

I can't seem to recreate the problem, but I'm not too surprised you're getting it. My guess is you may not be completely refreshing the jQuery. How are you loading up the jQuery and jQuery UI stuff? Is it possible that your automatic refresh is bypassing the initialization?
Jonathan Pohlner
Posted: Feb 28 2012 kl. 9:00 AM

As usual, when I get bogged down in "why isn't this working?", it was the initialization... I was using ajax to redraw a big div, and even though it contained the id's, it had severed the node connections. I looked up refresh the page with java-script and it is now flowing as originally desired. Thanks for your advice on the User Interface and I appreciate you taking the time to sign-up for an account to look into this.
Andy
Posted: Mar 03 2012 kl. 9:19 PM

No problem. I'm glad to see what you're working on. Keep up the good work and let me know when this thing goes live!

-Andy