UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

trigger_wait

HOT
broken avatar :(
Created 12 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
5,943 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
I am new at scripting.

But when i put my script in game it give me a bad syntax error for this:

Code Snippet
Plaintext
trigger_wait( "intrig1", "targetname" );
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
I am new at scripting.

But when i put my script in game it give me a bad syntax error for this:

Code Snippet
Plaintext
trigger_wait( "intrig1", "targetname" );

That line is fine, its likely something either above or below that line thats causing the error.

Also, i don't think "trigger_wait" is an actual function. Do this:

Code Snippet
Plaintext
trigger waittill("NOTIFY HERE");
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
That line is fine, its likely something either above or below that line thats causing the error.

Also, i don't think "trigger_wait" is an actual function. Do this:

Code Snippet
Plaintext
trigger waittill("NOTIFY HERE");

i replace trigger_wait with trigger waittill

but i still got the error
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
trigger_wait is a function, at least according to ugx-mod wiki. However like deadra said bad syntax errors usually are above or below the specified lines printed to the console. So possibly you have an extra { / } or [ / ] or ( / ) or you are missing a semicolon.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
i replace trigger_wait with trigger waittill

but i still got the error

Can you post a few lines above and a few lines below the actual line?
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Can you post a few lines above and a few lines below the actual line?

Code Snippet
Plaintext
trigger waittill( "intrig1", "targetname" );

plat[i] moveto (level2.origin, time);
level.floor = 1;
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Code Snippet
Plaintext
trigger waittill( "intrig1", "targetname" );

plat[i] moveto (level2.origin, time);
level.floor = 1;

Is
Code Snippet
Plaintext
plat[i]
defined anywhere?
Last Edit: June 24, 2014, 04:29:42 am by thezombiekilla6
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Code Snippet
Plaintext
trigger waittill( "intrig1", "targetname" );

plat[i] moveto (level2.origin, time);
level.floor = 1;

Is that above or below it?

also, waittill isn't used to get an entity.

Is
Code Snippet
Plaintext
plat[i]
defined anywhere?

That would give an uninitialized variable error, not a bad syntax.
Last Edit: June 24, 2014, 04:32:03 am by daedra descent
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
1) Is the
Code Snippet
Plaintext
plat[i]
in a for statement? If so then that is fine.
2) I don't believe level2.origin can be used, at least I haven't seen it used. For safety just do level.origin or self.origin. Also make sure level.origin is defined somewhere.
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Here is my whole script i wrote by myselfs

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

main()
{
time = 30;
level.floor = 0;
intrig1 getEnt( intrig1, targetname );
outtrig1 getEnt( outtrig1, targetname );
intrig2 getEnt( intri2, targetname );
outtrig2 getEnt( outtrig2, targetname );
plat geEnt (plat, targetname);
level1 getEnt ( level1, targetname);
level2 getEnt ( level2, targetname


//intrig1

trigger waittill( "intrig1", "targetname" );

plat[i] moveto (level2.origin, time);
level.floor = 1;


//intrig2

trigger waittill( "intrig2", "targetname" );

plat[i] moveto (level1.origin, time);
level.floor = 0;



//outtrig1

trigger waittill( "outtrig1", "targetname" );

plat[i] moveto (level1.origin, time);
level.floor = 0;


//outtrig2

trigger waittill( "outtrig2", "targetname" );

plat[i] moveto (level2.origin, time);
level.floor = 1;




if( level.floor == 1 )
{
intrig1 enable_trigger();
intrig2 disable_trigger();
outtrig2 enable_trigger();
outtrig1 disable_trigger();

}

if( level.floor == 2 )
{
intrig2 enable_trigger();
intrig1 disable_trigger();
outtrig1 enable_trigger();
outtrig2 disable_trigger();

}

}









I am trying to make a elevator




1 = outtrig2
2 = outtrig1
3 = intrig3
4 = intrig4
5 = plat
6 = level2
7 = level1
red = trigger
black platform is script_brushmodel
green = script_origin
outtrigs are the buttons outside the elevator and intrigs are buttons inside.

** the trigger does not move with the plat **
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Here is my whole script i wrote by myselfs

Code Snippet
Plaintext
level2 getEnt ( level2, targetname


You forgot the ); at the end   
Last Edit: June 24, 2014, 04:43:49 am by thezombiekilla6
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Here is my whole script i wrote by myselfs

Code Snippet
Plaintext
level2 getEnt ( level2, targetname


You forgot the ); at the end

i fixed that and go the same error
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Is it on the same line? Or a different one.
also on the waittill it should be
Code Snippet
Plaintext
trigger waittill ("trigger");
and shouldnt the variable be the exact same as the actual line like in this code
Code Snippet
Plaintext
intrig1 waittill ("trigger");
and
Code Snippet
Plaintext
intrig2 waittill ("trigger");
etc
Last Edit: June 24, 2014, 05:00:52 am by thezombiekilla6
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Is it on the same line? Or a different one.
also on the waittill it should be
Code Snippet
Plaintext
trigger waittill ("trigger");

on this line:

Code Snippet
Plaintext
trigger waittill( "intrig1", "targetname" );
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
on this line:

Code Snippet
Plaintext
trigger waittill( "intrig1", "targetname" );

try changing it to what I said, and give the variable intrig1 instead of trigger

 
Loading ...