![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Basic4ppc Wishlist Missing any feature? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
It would be very helpful IMHO if sprite collision (ability) could be turned on/off and still have the sprite visible and doing things. It would seem to me that it could save a lot of interrupts uneccessarily and could save a lot of testing code.
If this can be done already in some way I would be grateful to hear of it.
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! |
|
|||
|
Wow, thank you very much. I have not downloaded yet but had to reply with gratitude.
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! |
|
|||
|
Thank you agraham and of course Erel for permission. I can confirm that the Intersection problem is now solved and it works correctly, pixel perfect!!
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! |
|
|||
|
Not wishing to appear greedy, but will you please now explain how to get over the double event triggered by a collision when neither sprite is going to be deleted.
It appears (from an earlier post I made) that the system will not simply ignore it by counting two and then dealing with it. This would of course be what is commonly called the icing on the cake.
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! Last edited by enonod : 06-29-2009 at 07:26 AM. |
|
|||
|
Sorry about the multi posts but I assume editing might not get noticed.
I have checked the new anti-collision and I believe there was a misunderstanding or reading. Quote:
To turn the collision mechanism off altogether is undoubtedly useful, but please could the original request (possibly badly explained) be considered? It could be done now using your new ID and filtering it in the collision sub, I presume, but it doesn't prevent the collision sub being called and slowing the system down. Of course I don't know how this could possibly be done, but sprites do already have some properties and this could presumably be just one more??? [Edit]Sorry to be a bore but I tried this and I get the error Object must first be created.... The idea of all this is to do something to a specific sprite if it collides but not if it is some other sprite. gw.s has been created as a sprite and works Quote:
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! Last edited by enonod : 06-29-2009 at 08:25 AM. |
|
||||
|
I am going to rewrite collisions later today or tomorrow so I'll look at it then.
Those lines of code appear to work fine for me. Which object on which line?
__________________
Sorry, but I don't answer questions by PM or email. Please post your queries in the forum. |
|
|||
|
Quote:
Sorry for not being clear... it refers to the first line in the collision sub Spr1.value=gw.Sprite1 Spr1 has been in the objects list all along and not presented a problem. [Edit] Profound apology... a typo, leaving in a comment marker. Works fine
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! Last edited by enonod : 06-29-2009 at 11:49 AM. |
|
|||
|
Having got over the self inflicted error, I find that the following produces '0' on both labels.
The if is handled as true for either gw.sprite1 or 2 and the two id's are "cw" and "fred". I cannot see that anything is wrong with the code, so I will leave it with you while you do your rewrite. Quote:
__________________
You never stop learning until you die. Sometimes I think I am dead. Sometimes others think I am dead! |
|
||||
|
I'm afraid your code is wrong. Basic4ppc can't handle compound references to properties and methods like "gw.Sprite1.ID". The IDE doesn't error this but returns 0 or an empty string. The optimising compiler will however error it, though not with a helpful message. You need to use this code.
Code:
Sub gw_collision Spr1.value=Gw.Sprite1 Spr2.value=Gw.Sprite2 label3.Text=Spr1.ID label4.Text=Spr2.ID ...
__________________
Sorry, but I don't answer questions by PM or email. Please post your queries in the forum. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assembly properties | Pachuquin | Questions & Help Needed | 1 | 05-05-2009 06:42 PM |
| Compiled Properties | Zenerdiode | Basic4ppc Wishlist | 4 | 03-06-2009 09:54 PM |
| Properties module - useful module for working with properties / ini files | Erel | Code Samples & Tips | 0 | 11-07-2008 09:01 PM |
| Evaluate properties | Offbeatmammal | Basic4ppc Wishlist | 0 | 06-02-2008 07:23 AM |
| More properties for panels | RandomCoder | Basic4ppc Wishlist | 0 | 07-12-2007 09:48 PM |