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

Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post by Splaetos »

1024 screenshots are annoying >.<
When I am king, you will be first against the wall~
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

sry should have thought of that
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 trying to break in on purpose...? :shock: ;)

Code: Select all

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

Let's see how the game 'sees' this....

NIL time 1.5 :?
set variable local.switch = $switch object
set variable local.block = $block object

Obviously in the first line the game doesn't yet know local.block is $block, because you have defined it later. Make it like this:

Code: Select all

local.switch = $switch
local.block = $block 
local.block time 1.5
Now the game 'sees':

set variable local.switch = $switch object
set variable local.block = $block object
[$block object] time 1.5 -- ok consider it done, your script is my command :)

Also you need to add 'move' and 'waitmove' lines... otherwise the block won't move an inch :wink:
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ok, where do i put these 'move' and 'waitmove's

Code: Select all

main: 
	level waittill spawn 
thread controls 
end 


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

while(1) 
  { 
    local.switch waittill trigger 
    local.block moveup 256
    waitmove 
    local.block movedown 256
    waitmove 
    local.block moveup 256
    waitmove 
    local.block movedown 256
    waitmove

    waitframe 
  } 
goto controls
end
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes the placement of the waitmove's is good... should be 'local.block waitmove' though not just 'waitmove'... you only still need to move that local.block time 3 line and what-o-what is the 'goto controls' line for? :?
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

i dunno... ill take it out... i had those waitmoves there eversince i wrote the script.... but ill make them local.clock waitmoves and i forgot to move the local.block time 3 :lol: ill get it right now...

Code: Select all

main: 
	level waittill spawn 
thread controls 
end 


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

while(1) 
  { 
    local.switch waittill trigger 
    local.block moveup 256
    local.block waitmove 
    local.block movedown 256
    local.block waitmove 
    local.block moveup 256
    local.block waitmove 
    local.block movedown 256
    local.block waitmove

    waitframe 
  } 
end

But unfortunatly, i cant test it. I cant load up MOHAA cuz i just got a new vid card (GeForce FX 5200 Asylum with 256 mb AGP - Special additon= 10% faster than normal 5200 model) and MOHAA just crashes saying it cant load the OpenGL... AIM does that too when i press enter to send a message, AIM crashes.


Wow, 4 pages already. Glad so many ppl are helping me :) (mainly JV_map, Bjarne gave up on me lol)
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Regarding mohaa just install proper vid drivers for your new card (uninstall the old ones first). I think you finally have a working script on your hands :D
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

Yeah, the dirvers that came on the disk were outdated :? had to go on the site for new drivers... anywho, i still gotta test the script...
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ITS NOT WORKING STILL! SHOOT MEEEEEE!! :evil:

Code: Select all

main: 
	level waittill spawn 
thread controls 
end 


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

while(1) 
  { 
    local.switch waittill trigger 
    local.block moveup 256
    local.block waitmove 
    local.block movedown 256
    local.block waitmove 
    local.block moveup 256
    local.block waitmove 
    local.block movedown 256
    local.block waitmove

    waitframe 
  } 
end
ill work on it tomarrow, i have TON of homework.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

If it's still not working your targetnames are incorrect or the block is not a script_object. :?
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

heres an interesting update, my friend and I are working on a map and it has an elevator which i scripted. The elevator works fine (with minor, fixable bugs) on both my comp and his :? so ill have to take a HARD look at my map and script im using to test.
Image
Post Reply