Computer Science Canada Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
Author: | Virtuosity of Inaction [ Sun Oct 13, 2013 10:34 pm ] | ||
Post subject: | Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites | ||
What is it you are trying to achieve? I am trying to program (admittedly miserably, with flogging hopes) an actuator or mechanism to perform the action of spatially manipulating a doublet of separate objects along the x-axis, abiding by the policy of a stipulated condition defined by the "if" operator and operands, in the context of Sprite animations. The stipulation is qualitatively straight-forward or conceptually simple in the framework of my objective : objects are moved by the user and when the objects coincide or collide, the images change and an appropriate message is displayed to the user. What is the problem you are having? As indicated or suggested in the title, I am experiencing difficulties with configuring the stipulations to define a coincidence event in the interaction of the user with the spatial objects. In the below code, you will see "if" conditionals (e.g. if xPositionTank < 600 then and not xPositionTank + Pic.Width (TankWalkR) > xPositionBomb then"). However, when I run the program, the program returns the error notification, "Invalid Pic ID", causing my program to misbehave or malfunction. Describe what you have tried to solve this problem I have tried redefining the Pic parameters in the Twalk and Bwalk features, but have not integrated and synthesized results. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using Turing 4.1.1 |
Author: | Zren [ Sun Oct 13, 2013 10:57 pm ] | ||
Post subject: | Re: Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites | ||
Virtuosity of Inaction @ Sun Oct 13, 2013 10:34 pm wrote: What is it you are trying to achieve?
I am trying to program (admittedly miserably, with flogging hopes) an actuator or mechanism to perform the action of spatially manipulating a doublet of separate objects along the x-axis, abiding by the policy of a stipulated condition defined by the "if" operator and operands, in the context of Sprite animations. The stipulation is qualitatively straight-forward or conceptually simple in the framework of my objective : objects are moved by the user and when the objects coincide or collide, the images change and an appropriate message is displayed to the user. ... *woosh* Quote: What is the problem you are having? As indicated or suggested in the title, I am experiencing difficulties with configuring the stipulations to define a coincidence event in the interaction of the user with the spatial objects. In the below code, you will see "if" conditionals (e.g. if xPositionTank < 600 then and not xPositionTank + Pic.Width (TankWalkR) > xPositionBomb then"). However, when I run the program, the program returns the error notification, "Invalid Pic ID", causing my program to misbehave or malfunction.
Sprite.New() returns an integer which represents a sprite id. The parameter for Sprite.New() requires an integer representing a picture id. The parameter for Pic.Width() requires an integer representing a picture id. Sprite id != picture id. Both ids are represented by integers, which is why there's no compile time errors. Though just because there's a picture with an id of 234 doesn't mean there's a sprite with that id. |
Author: | DemonWasp [ Sun Oct 13, 2013 11:03 pm ] |
Post subject: | RE:Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
I think your problem is that you're calling Pic.Width and giving it a sprite ID rather than a picture ID (they are not interchangeable). Also, are you trying to sound like this: http://www.smbc-comics.com/index.php?db=comics&id=2295 ? |
Author: | Raknarg [ Sun Oct 13, 2013 11:43 pm ] |
Post subject: | RE:Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
"I have a tank and if it crashes into the bomb it should explode". Just as easy to say, muchmore understandable (assuming I'm interpreting that correctly) |
Author: | Virtuosity of Inaction [ Mon Oct 14, 2013 7:14 pm ] |
Post subject: | Re: Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
Thanks for the help! I understand how the wording of my post was overcomplicated, but I do not cede obscurantism, especially not by aid of the thesaurus. If you need to know and clarification is in order, the aforementioned is how I normally speak, unless I am attending to the likes of infants. |
Author: | Raknarg [ Mon Oct 14, 2013 7:46 pm ] |
Post subject: | RE:Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
OK. I'm just saying you're going to come off in the wrong way (and you kindof are now, I'd appreciate you not insinuating that my speech is comparable to what you would use for an infant), and people are going to have a hard time understanding you. And no problem, come back any time. |
Author: | Insectoid [ Mon Oct 14, 2013 8:16 pm ] |
Post subject: | Re: Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
Virtuosity of Inaction @ Mon Oct 14, 2013 7:14 pm wrote: Thanks for the help!
I understand how the wording of my post was overcomplicated, but I do not cede obscurantism, especially not by aid of the thesaurus. If you need to know and clarification is in order, the aforementioned is how I normally speak, unless I am attending to the likes of infants. Yeah, I'm not buying that. If wording your messages this way makes you feel intellectual or brilliant, that's fine, but that really isn't the response you're effecting. Whether this is how you speak in real life or not, it would benefit everyone for you to word your posts clearly and concisely. I for one didn't bother to help purely because I didn't want to expend the effort to read your post, which could have been one sentence long. |
Author: | Amailer [ Mon Oct 14, 2013 9:10 pm ] |
Post subject: | RE:Relatively New : Pic.Width Incompatability (Invalid Pic ID) with Sprites |
Sorry I don't mean to hijack this topic but I enjoyed the OP's post, it was a fun read, just wanted to say that. Probably isn't the best way to ask for help though. Carry on. |