13.05.2012, 12:49
AddStaticPickup doesn't return an ID, so basically deleting the icon and re-making a new icon will work for house id 0 only.
Try changing AddStaticPickup to CreatePickup.
Edit:
Now for your 2nd problem, you didn't assign a new pickup to "HouseEnter[id]", I can also see that you've made it create the blue house icon BEFORE destroying the green icon.
After changing AddStaticPickup to CreatePickup assign that blue pickup to "HouseEnter[id]" and place it AFTER destroying the old pickup.
Edit 2:
I've also noticed you made a "new pickupid" then compared it to "HouseEnter[id]" without even assigning the "pickupid" any value, which makes it always 0.
Try changing AddStaticPickup to CreatePickup.
Edit:
Now for your 2nd problem, you didn't assign a new pickup to "HouseEnter[id]", I can also see that you've made it create the blue house icon BEFORE destroying the green icon.
After changing AddStaticPickup to CreatePickup assign that blue pickup to "HouseEnter[id]" and place it AFTER destroying the old pickup.
Edit 2:
I've also noticed you made a "new pickupid" then compared it to "HouseEnter[id]" without even assigning the "pickupid" any value, which makes it always 0.