Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
How to Delete/Remove Sprite?
Print
Pages: [
1
]
Author
Topic: How to Delete/Remove Sprite? (Read 6738 times)
0 Members and 1 Guest are viewing this topic.
idontmakesense
Newbie
Posts: 13
How to Delete/Remove Sprite?
«
on:
February 26, 2014, 11:02:24 am »
mySprite.setTexture(NULL) gives syntax error.
Any alternatives?
Logged
Rhimlock
Jr. Member
Posts: 73
Re: How to Delete/Remove Sprite?
«
Reply #1 on:
February 26, 2014, 11:05:34 am »
You dont have to Remove a sprite.
What do you want to achive by doing something like that?
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: How to Delete/Remove Sprite?
«
Reply #2 on:
February 26, 2014, 11:07:19 am »
You should probably learn basic C++ instead of trying random things. You can remove something from another data structure like an STL container, but not "on its own".
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
idontmakesense
Newbie
Posts: 13
Re: How to Delete/Remove Sprite?
«
Reply #3 on:
February 26, 2014, 11:13:25 am »
Sorry to be unclear. Its my first attempt making a game and coding on sfml.
I have a "car sprite" which on collision with a "bullet sprite" should, well, for now disappear/get removed/get deleted.
Any help on how to achieve that?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11032
Re: How to Delete/Remove Sprite?
«
Reply #4 on:
February 26, 2014, 11:17:38 am »
If it shouldn't appear on the screen anymore, don't draw it to the screen. And yes, acquire a solid C++ understanding first.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
How to Delete/Remove Sprite?
anything