Little help.
Moderator: Core Staff
Little help.
I cant get trigger to move. I followed the tutorial but i have no clue if the trigger is moving.
Also what is the code to make the user commit suicide?
user suicide(); ?
Also what is the code to make the user commit suicide?
user suicide(); ?
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Little help.
Post your code
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Little help.
laserset()
{
laserTrigger = getent("laserTrigger","targetname");
trigger = getent("laserset1Hurt","targetname");
laserTrigger waittill("trigger",user);
thread laserSet1();
trigger waittill("trigger",user);
user suicide();
wait(1);
}
laserset1()
{
trigger = getent("laserset1Hurt","targetname");
laserSet = getent("laserSet1","targetname");
trigger enablelinkto();
trigger linkto(laserSet);
laserSet moveX(200,2);
laserSet wait(2);
laserSet moveY(-928,2);
laserSet wait(2);
laserSet moveX(-200,1);
wait(1);
}
EDIT: IT saying bad syntax now.
Re: Little help.
what line does it have a problem with syntax?
Type /developer 1 and then run the map, it will give a full description.
Type /developer 1 and then run the map, it will give a full description.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Little help.
no worries it sorted. It was the wait()'s and the fact i put the entity name before them as well. It kl i doing fine now
Re: Little help.
Don't forget to make that targetname more complex! Put the map name in front of them to avoid conflicting!
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Little help.
k ill remember that. Put i cant get the lasers to repeat. The user goes through the trigger then they come. They go back but if you go through tthe trigger again they dont come.
Script so far.
Script so far.
Code: Select all
laserset()
{
laserTrigger = getent("laserTrigger","targetname");
triggerHurt = getent("laserset1Hurt","targetname");
laserTrigger waittill("trigger",player);
thread laserSetone();
triggerHurt waittill("trigger",user);
user suicide();
wait(1);
}
laserSetone()
{
trigger = getent("laserset1Hurt","targetname");
laserSet = getent("laserSet1","targetname");
wait(0.05);
trigger enablelinkto();
trigger linkto(laserSet);
laserSet moveX(200,2);
wait(2);
laserSet moveY(-928,2);
wait(2.5);
laserSet moveX(-300,1);
wait(2);
laserSet moveY(928,2);
wait(2);
laserset moveX(100,1);
wait(1.5);
}
Re: Little help.
If you want the lasers to repeat, you will have to put it in a loop.
Try this
Code: Select all
laserset()
{
laserTrigger = getent("laserTrigger","targetname");
triggerHurt = getent("laserset1Hurt","targetname");
while(1)
{
laserTrigger waittill("trigger",player);
thread laserSetone();
triggerHurt waittill("trigger",user);
user suicide();
wait(1);
}
}
laserSetone()
{
trigger = getent("laserset1Hurt","targetname");
laserSet = getent("laserSet1","targetname");
trigger enablelinkto();
wait(0.05);
trigger linkto(laserSet);
wait 0.05;
laserSet moveX(200,2);
wait(2);
laserSet moveY(-928,2);
wait(2.5);
laserSet moveX(-300,1);
wait(2);
laserSet moveY(928,2);
wait(2);
laserset moveX(100,1);
wait(1.5);
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Little help.
Nightmare wrote:Don't forget to make that targetname more complex! Put the map name in front of them to avoid conflicting!
Your quite the stickler on this arent you NM? I understand why your saying it tho. I have never done that and I have yet to have a problem.
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo
-
- Core Staff
- Posts: 14220
- Joined: October 21st, 2004, 7:17 pm
- Location: Holland
- Contact:
Re: Little help.
Better safe that sorry no ? I'm no mapper, not even a scripter, and tbh, its valid that he sais it.
matt101harris wrote:big cock was the first thing that came to my head lol
Re: Little help.
For some reason the lasers keep getting stuck then they dont move. They dont go back to there original posittion.
Also they not repeating. Went through the trigger again and didnt come.
Also they not repeating. Went through the trigger again and didnt come.
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Little help.
Stroke harder next time.oppdelta wrote:Went through the trigger again and didnt come.
The trigger must be trigger_multiple if you want to make them repeat several times(every time you touch the trigger they move) or a trigger_once if you just want to activate the movement.
Also:
is unnecessary.laserTrigger waittill("trigger",player);
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: Little help.
ok it going all over the place now :S
Cna somone make it so it moves 200 units on X then move 900 units on Y then make it go on X - 300. Then make it go back to original posistion.
Cna somone make it so it moves 200 units on X then move 900 units on Y then make it go on X - 300. Then make it go back to original posistion.
Code: Select all
laserset()
{
laserTrigger = getent("laserTrigger","targetname");
triggerHurt = getent("laserset1Hurt","targetname");
while(1)
{
laserTrigger waittill("trigger");
thread laserSetone();
thread laserSetOneHurt();
}
}
laserSetone()
{
trigger = getent("laserset1Hurt","targetname");
laserSet = getent("laserSet1","targetname");
trigger enablelinkto();
wait(0.05);
trigger linkto(laserSet);
wait 0.05;
laserSet moveX(200,2);
laserSet waittill("movedone");
laserSet moveY(-928,2);
laserSet waittill("movedone");
laserSet moveX(-300,1);
wait(2);
laserSet moveY(928,2);
laserSet waittill("movedone");
laserset moveX(100,1);
laserSet waittill("movedone");
}
laserSetOneHurt()
{
triggerHurt waittill("trigger");
user suicide();
wait(1);
}
Re: Little help.
Cheers KS but if you hit them you dont die anymore.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Little help.
Code: Select all
laserSetOneHurt()
{
triggerHurt waittill("trigger");
user suicide();
wait(1);
}
Code: Select all
laserSetOneHurt()
{
triggerHurt waittill("trigger", user);
user suicide();
wait(1);
}
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 38 guests