MegaKerma / Silent Walk FPS Creator / Silent Walk: RENAISSANCE

Tools for creating 3D games
It is currently Thu Nov 15, 2018 11:34 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 01, 2013 12:44 pm 
Offline
Registered member
Registered member
User avatar

Joined: Sat Oct 26, 2013 5:33 pm
Posts: 30
Location: Ukraine
So burn the cube shot of lightning ... :)

URL is hidden from guests, please register and login to view the hyperlink

URL is hidden from guests, please register and login to view the hyperlink

Image

or read explain .........
-----------------------------------------

We have two routines [for GOSUB] -

/ / - Name: shot
Code:
CHECKINTERSECT cube blast fire1


/ / - Name: newStepScript
Code:
INC fireCub BY 1
IF fireCub = 40
DESTROY cube
ENDIF


Image

---

And the program in objects :

In cube [pic.2]
Image
Code:
IF fire1 = 1
SETOBJECTTEXTURE cube flame
SETOBJECTEVENTSCRIPT cube STEP newStepScript
ENDIF



In player [pic.3]
Image
Code:
/ / -------------------------- Shot when press '0 '
HIDEOBJECT blast
IFKEYDOWN 11
SHOWOBJECT blast
GOSUB shot
ENDIF



Since the interpreter reads like us, from top to bottom , and reaching the end begins again, we can track what we have indicated to him along the way.

So -- Hide object [blast] - see if you pressed "0 " - if not then keep reading after the word ENDIF - and there 's nothing :) - we read in the cube - watch it true equality - while perhaps not - read first ... All this happens very quickly, one cycle takes a split second reading

But everything changed when we press the "0"

So keep reed again - Hide object [blast] - see if you pressed "0" - Ohmy someone clicked it :) - then show object [blast] - and go read a subroutine named [shot] read it we will be back at the same place where the left read as if walking on a footpath collapsed into the pit and then got out and walked away :)

- In the subroutine read - did not cross check whether the [cube] and [blast], if not then we'll be back with the parameter [fire1 = 0] , and continue reading

- But if the objects intersect ( ie in the game you get the beam into a cube ) - we will return from the subroutine with parameter [fire1 = 1]

- Reading and then we 'll get to [IF fire1 = 1] and say yes :) - then change the texture of the object cube on the jigsaw pattern - fire :) , and that's the main thing ----- SETOBJECTEVENTSCRIPT --- not just read a subroutine named [ newStepScript] and replace it the whole program has been used in the object cube ...

Ie instead of -
Code:
IF fire1 = 1
SETOBJECTTEXTURE cube flame
SETOBJECTEVENTSCRIPT cube STEP newStepScript
ENDIF


is a two -
Code:
INC fireCub BY 1
IF fireCub = 40
DESTROY cube
ENDIF


and it is - a counter - detonator , in order that we may see an animated texture of fire as the, since the disappearance of the object is instantaneous , this counter will be a new texture to the fire until the count from 0 to 40 ... and then disappears

---------------
by the way...

interpreter - it is a small daemon that sits in your program reads the script that you write to him, and moves objects :)

_________________
carry round and square roll


Top
 Profile  
 
PostPosted: Sat Nov 23, 2013 1:22 am 
Offline
Registered member
Registered member
User avatar

Joined: Sat Oct 26, 2013 5:33 pm
Posts: 30
Location: Ukraine
mayya wrote:
Yeah it's a bug I noticed too. ...


Maybe I'm wrong to express myself, because I write through Google translator. However, this example describes an animation when you shoot a subject when hit by lightning or a bullet in the thing he loses himself on fire animation, and disappears. Ie as if it burns when hit his shot.

If I do not understand that I ask forgiveness :roll:

_________________
carry round and square roll


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group