|
Post by 06hypersonic60 on May 29, 2012 15:48:32 GMT -5
make a global to load the sprite then hide it:
global Locker = LoadSprite("interface\locker.png") HideEntity Locker
then simply in the object update function
If EntityDistance(o\Entity,p\Objects\Entity)<50 Then ShowEntity locker : PositionEntity locker , EntityX#(o\entity), EntityY#(o\entity), EntityZ#(o\entity) locker,2,2 end if
and finally use : HideEntity locker after the collision code so the sprite hides when u collide with object.
P.S: Use the code that EBD gave me ( look at pick nearest object thread in helps ) to make this peace of code work better. Once u have that code set-up, change o\Entity with no\entity since on\entity means : nearestObject\Entity
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on May 29, 2012 16:19:39 GMT -5
k got you
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on May 29, 2012 16:21:15 GMT -5
And btw do I put global Locker = LoadSprite("interface\locker.png") HideEntity Locker
in Game_resources_textures.bb? or models.bb?
|
|
|
Post by 06hypersonic60 on May 30, 2012 6:15:06 GMT -5
whereever you want. globals can be put everywhere except functions and loops
|
|
|
Post by 06hypersonic60 on May 30, 2012 11:31:38 GMT -5
Update: Now, objects appear again when you die. Flying Enemies appear a while after destroying them like gens and SU. Added ring loss ( like in sonic dash ) added more object to be able to add in-game (obj placement) added a debug mode. tells you your X,Y,Z position.
|
|
|
Post by EightBitDragon on May 30, 2012 12:03:57 GMT -5
Now, objects appear again when you die. How are you handling the re-spawn of objects? Are you deleting the remaining objects, and then reloading all of them? (That's what we did in Freerunner when you select a new stage - everything gets deleted and reloaded) Or did you make a flag that tells the object that it has been killed, and when Sonic dies it resets them all to alive? I think the ladder would be more efficient, I'm just curious how you programmed yours.
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on May 30, 2012 15:18:25 GMT -5
Wait, now the locker is too small,any way to scale it?
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on May 30, 2012 15:43:40 GMT -5
nvm i found out,I used ScaleSprite.
|
|
|
Post by 06hypersonic60 on May 30, 2012 16:10:38 GMT -5
Now, objects appear again when you die. How are you handling the re-spawn of objects? Are you deleting the remaining objects, and then reloading all of them? (That's what we did in Freerunner when you select a new stage - everything gets deleted and reloaded) Or did you make a flag that tells the object that it has been killed, and when Sonic dies it resets them all to alive? I think the ladder would be more efficient, I'm just curious how you programmed yours. Well Simply added a variable ( global ) that tells that the object is destroyed. this variable is named : objDestroyed and it's set to false. If it's True then HideEntity o\Entity else show the entity when sonic jumps or homes on the object that flag = true. When you die it resets to false. so the obejct appears again
|
|
|
Post by Redler Red7 on May 30, 2012 20:04:03 GMT -5
I'm guessing it also has a string that asks if sonic is with in range, and if he isn't, it'll reappear? THAT'S BRILLIANT!
|
|
|
Post by 06hypersonic60 on Jun 1, 2012 18:04:35 GMT -5
new update: look at the picture this is not arcus. It's a test engine. I add stuff to it. when I think they look good, I copy them into Arcus. That way, Arcus's source code will be safe. Also: changed the redy go sound, and added to others. The game now plays a randome sound each time you die or start the game.
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on Jun 1, 2012 20:10:10 GMT -5
Pretty Good. ;D and how did you do that?
|
|
|
Post by 06hypersonic60 on Jun 2, 2012 4:41:05 GMT -5
well simply added pictures and made them move by changeing they'r X and Y with a timer which means I use a variable that has the image X and a variable for the Y and set a timer to make the variables number change
|
|
|
Post by 06hypersonic60 on Jun 3, 2012 8:42:46 GMT -5
Added a Speed bar like in unleashed
|
|
3DSawnikku
Relic Team
Pro Coder,Rigger,Animator,GIMP-er,Etc
Posts: 647
|
Post by 3DSawnikku on Jun 3, 2012 12:47:23 GMT -5
i added that but it got anoyying at first.So i ahad to remove it.
|
|