Jump to content

How to use references ?


ZippyDSMlee

Recommended Posts

Okay I get some of it, make a dummy cell not sure how to handle it via code.

 

 

What I am trying to do is delete my activator after I am done firing off the dummy weapon.

 

Heres the script I am using. I am using 2 sets of these one for projectile set 1 that makes 4 grenades and one for projectile set 2 which makes 4 per the previous 4.

short doOnce
float fTimer
int iCount

Begin GameMode

	if fTimer < 0.1
		set fTimer to fTimer + GetSecondsPassed
	else
		set iCount to iCount + 1
		set fTimer to 0
else
          if doOnce != 1
          set doOnce to 1
		Fireweapon WeapzippyDGLDUMMYPRIMARY



else
		if fTimer == 3.5
			else

				MarkForDelete ZippyActivatorPRIMARYdgl
	      
      

    endif
       endif
          endif


End



edit

I guess what I really need is a better timer script?

 

 

I found this I think it will work but I am unsure, just need to fig out the error I am getting ><.

ScriptName zippyDGLPRIMARYscript

short doOnce

short    iState
float    fTimer

begin GameMode

    if iState        if (fTimer >= 5) && (iState == 3)
                        set fTimer to 0
            set iState to 0
        elseif (fTimer >= 2) && (iState == 2)
            MarkForDelete ZippyActivatorPRIMARYdgl

            set iState to 3
        elseif (fTimer >= 1) && (iState == 1)
                         if doOnce != 1
set doOnce to 1
Fireweapon WeapzippyDGLDUMMYPRIMARY

            set iState to 2
        endif        set fTimer to fTimer + GetSecondsPassed
    endif

end

edit

new version it has no errors but won't save....mmmm

ScriptName zippyDGLPRIMARYscript

short    iState
float    fTimer

begin OnTriggerEnter player

    set fTimer to 0
    set iState to 1

end

begin GameMode

    if iState
        if (fTimer >= 5) && (iState == 3)
            (Do something)
            set iState to 0
            
            Disable ZippyActivatorPRIMARYdgl
            MarkForDelete ZippyActivatorPRIMARYdgl

        elseif (fTimer >= 2) && (iState == 2)
            
            set iState to 3
        elseif (fTimer >= 1) && (iState == 1)
            Fireweapon WeapzippyDGLDUMMYPRIMARY
            set iState to 2
        endif
        set fTimer to fTimer + GetSecondsPassed
    endif

end

 

Edited by ZippyDSMlee
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...