Welcome New User Home | Forums | Register | Login | Larger Font
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
illram [Tutor]
Iroc [Forum]
games12345 [Downl]
GomerPyle [Forum]

4 Members and 16 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Friday, Jul. 4th
MODSonair Episode 134
Thursday, Jul. 3rd
Happy 4th of July
Monday, Jun. 30th
Major Retailer Confirms 360 Price-Cut
Sunday, Jun. 29th
MODSonair 134 Live
Friday, Jun. 27th
MODSonair Episode 133
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline. 79.49%
I could see a benefit of a Wiki. 6.41%
I think it would take away from the community. 6.41%
Wiki sites are never good. 2.56%
Wiki... isn't that Buck Roger's robot slave? 5.13%
Read More...
7 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Editor Problem
CoDUO Level Desi.. Posts: (2) Views: (17) by GomerPyle
CoDUO Radiant Problem
CoDUO Level Desi.. Posts: (4) Views: (94) by 1ninjaman1
PLEASE HELP ME, Getting distressed
CoD 4 Level Desi.. Posts: (2) Views: (30) by Nemo06c
worker command ecceded by x3
CoD 4 Level Desi.. Posts: (1) Views: (14) by one_richard
Art of War Central Half-Life 2 Mods for Dummies
Typhoon Servers
Forums
MODSonline.com Forums
Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD 4 Level Design
CoD 4 mapping and level design.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Scripting Help!!!
somedude
General Member
Since: Aug 2, 2005
Posts: 53
Last: Mar 26, 2008
[view latest posts]
Level 3
Category: CoD 4 Level Design
Posted: Tuesday, Mar. 25, 2008 05:47 pm
Ok, well i made an elevator for my map and it has two triggers for it to work, its pretty simple, but i keep getting an error saying array is not an object, i know why, because im using getentarray, but if i change getentarray to getent it will give me another error saying that i used getent with multiple entities. What can i use then? Here is my script (dont laugh):


Code:


Help please!
SpeedHighway
General Member
Since: Apr 30, 2005
Posts: 494
Last: Apr 9, 2008
[view latest posts]
Level 5
Category: CoD 4 Level Design
Posted: Tuesday, Mar. 25, 2008 07:36 pm
Okay, need more information

How many elevators do you have?
That would be the only reason you should have multiple entities under the same name. If you have more than one entity for the same name and it's all one elevator, then I'll help with that, if it's something else, we need to determine that.

Looking at this example, you definitely do not want to be using getentarray (unless you have multiple elevators)

You said you have more than one switch? That's the part where you need to use getentarray. But it's not a magic button, if you use an array, you need to rewrite a bit of the code.

What line are you getting an error on?

Is this example of code what you're talking about, because there's no getentarray in the entire thing.

:)

edited on Mar. 25, 2008 07:38 pm by SpeedHighway
somedude
General Member
Since: Aug 2, 2005
Posts: 53
Last: Mar 26, 2008
[view latest posts]
Level 3
Category: CoD 4 Level Design
Posted: Tuesday, Mar. 25, 2008 10:06 pm
yeah i copy pasted the code i was trying to work with, here is where i have getentarray



Code:


i get the error at: elevatortrigger = getentarray ("elevatorswitch", "targetname");

I only have one elevator, two triggers.


edited on Mar. 25, 2008 10:09 pm by somedude
SpeedHighway
General Member
Since: Apr 30, 2005
Posts: 494
Last: Apr 9, 2008
[view latest posts]
Level 5
Category: CoD 4 Level Design
Posted: Wednesday, Mar. 26, 2008 11:14 am
Okay, if you have more than one trigger, you're going to have to put everything in a function. The problem with this is that it becomes a pain to make sure both triggers can't be hit at the same time. (Why do you have 2 triggers when you have the elevator move, wait, then move?)

I can jot down something to help if that's what you need, but first I should know if you seriously even want 2 triggers. If you do, then the logic of your script will need an overhaul =D. Let me know what I can do to help. :)
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Level Design
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline.com can be found News.php.
Art of War Central
Partners
My Topsites List
Call of Duty Headquarters
Frag Universe
modbase.be
Websites4Clans
Battle for Europe COD2
The Firing Box
XoXide
Ask About
Advertising
Friends
The Clan Database
SOF2 Files and Downloads
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 134
MODSonair Episode 133
MODSonair Special CoD:WW Episode
MODSonair Episode 132
MODSonair Episode 131
Next Show
The next MODSonair show will air LIVE on:
07/06/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware