Past couple scripts havnt been working ~ PLZ HELP!

Post your scripting questions / solutions here

Moderator: Moderators

Is this enough information for you to help me?

Yes
1
33%
No
2
67%
Fair enough
0
No votes
 
Total votes: 3

User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

lol


If i dont have a skybox will that screw up my script?
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

no, but any sunlight will not appear
Admin .MAP Forums
Image
Head above heels.
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

darn, thought i was on to something lol
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Are you aware you can't do any scripting on entity lights?

Better use a simpler object like a script_object or script_model. :wink:
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

you mean i cant just make a light and title it light and write a script for it? aw that sux. Ok, ill just use a 64 x 64 x 64 block that the trigger is on top of, lol.
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

:sigh: nothing happened.



------ First Try ------

I tried my old method with Targetnames and the waittills, goto's, etc.

here is my script

Code: Select all

main:

block_switch:
	$switch waittill trigger
	$switch nottriggerable
	wait 1
	$block hide
	wait 1
	$block show
	wait 1
	$block hide
	wait 1
	$block show
	wait 1
goto block_switch
end
im now going to try JV's thing that he showed me a diff way to do my scripts, hope i can do it :shock:
Last edited by HDL_CinC_Dragon on Thu Nov 18, 2004 9:38 pm, edited 1 time in total.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Your script doesn't work because it doesn't have a level waittill spawn line. Hence the game goes to the waittill trigger line immediately when the map is still loading... can't find the trigger (doesn't exist yet)... goes to the next line somehow manages to make your trigger nottriggerable and you're in the dead lock :wink: ... don't make a trigger nottriggerable if you should able to trigger things :wink:
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ah gotcha, ill try adding that. Im gunna try again with a diff script, I think i wrote it the way you told me to... but ill let you decide on that.

Code: Select all

main:
	level waittill spawn 
thread controls
	local.switch
	local.block
end 


controls: 
while(1) 
  { 
    local.switch waittill trigger 
    local.block hide
    wait 1
    local.block show
    wait 1
    local.block hide
    wait 1
    local.block show
    wait 1

    waitframe 
  } 
end
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

oh yeah i forgot to mention:

I still have the trigger>use Key: targetname Value: switch
script>object Key: targetname Value: switch
Worldspawn Key: script Value: Operation_Friggen_Scope.scr (which is what the SCR is titled)

Is that bad?




----

Hey, you guys logged out! you cant leave me here! I dont know what to do! AHHHHHHHHHHHHHHHH!
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

:sigh: i tried it with the old script but added a level waittill spawn but it still didnt work. im going to try both scripts with just moving the block and or down a couple units, maybe its the hide show thats not working (I am now delerious and wishfully thinking, not healthy)





--- nothings working
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Code: Select all

main:
   level waittill spawn
thread controls
   local.switch
   local.block
end
What's the last two lines doing there :? better make it just like this:

Code: Select all

main:
  level waittill spawn
  thread controls
end
Also in this thread:

Code: Select all

controls:
while(1)
  {
    local.switch waittill trigger
    local.block hide
    wait 1
    local.block show
    wait 1
    local.block hide
    wait 1
    local.block show
    wait 1

    waitframe
  }
end
You haven't defined local.switch nor local.block. Add these two lines:

Code: Select all

controls:
  local.switch = $targetnameofyourswitch
  local.block = $targetnameofyourblock

  while(1)
  {
    local.switch waittill trigger
    local.block hide
    wait 1
    local.block show
    wait 1
    local.block hide
    wait 1
    local.block show
    wait 1

    waitframe
  }
end
This way it will work, trust me 8-)
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ok, ill adjust the script and go for the test O_O



Test in progress, please wait...


it didnt work :shock: :cry:

Code: Select all

main: 
	level waittill spawn 
thread controls 
end 


controls:
local.block time 1.5
local.switch = $switch
local.block = $block

while(1) 
  { 
    local.switch waittill trigger 
    local.block moveup 64
    wait 2.5 
    local.block movedown 64
    wait 2.5 
    local.block moveup 64
    wait 2.5 
    local.block movedown 64 
    wait 2.5 

    waitframe 
  } 
end
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

well it didnt work but i did figure something out: Dont put Axis AI next to Allied AI:

http://img35.exs.cx/img35/6978/AxisAInexttoAlliedAI.jpg

* Edited by bdbodger recommended picture size 640x480
Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

Hehe, try naming your script obj block..... :?
I still have the trigger>use Key: targetname Value: switch
script>object Key: targetname Value: switch
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

oh whoops, my object is titled block. gotta fix that typeo in the post.
Image
Post Reply