Бывалый
Регистрация: 17.05.2009
Адрес: Днепропетровск
Сообщений: 672
Написано 180 полезных сообщений (для 428 пользователей)
|
Функции меня подвели
У меня есть до пустим 1 функция. И не важно что в ней и о чем она. Вот она перед вами:
Function CreateObject(n,x#,y#,z#,rotx#,roty#,rotz#,sclx#,sc ly#,sclz#,tp,tName$,texXx#,texYx#,dRazdel)
p.Objec = New Objec
p\ID = n
p\x = x#
p\y = y#
p\z = z#
p\rotx# = rotx#
p\roty# = roty#
p\rotz# = rotz#
p\sclx# = sclx#
p\scly# = scly#
p\sclz# = sclz#
p\typ = tp
p\razdel = dRazdel
p\entity = CopyEntity(entity(p\ID,p\razdel))
p\texX# = texXx#
p\texY# = texYx#
p\texName$ = tName$
p\tex = LoadTexture("Wdata\Models\zemla(1).jpg")
If p\tex <> 0
ScaleTexture p\tex,p\texX#,p\texY#
EntityTexture p\entity,p\tex
EndIf
PositionEntity p\entity,p\x,p\y,p\z
RotateEntity p\entity,p\rotx#,p\roty#,p\rotz#
EntityPickMode p\entity,2
EntityType p\entity,p\typ
ScaleEntity p\entity,p\sclx#,p\scly#,p\sclz#
End Function
|
Вызываю в программе:
If KeyHit(2 Then CreateObject(1,1,1,1,1,1,1,1,1,1,1,"",1,1,decRazde l)
|
Всё работает чудесно. Создает нужный мне объект и сразу лег под текстуру.
Второй способ:
Function LoadWorld(name$)
CreateObject(1,1,1,1,1,1,1,1,1,1,1,"",1,1,decRazde l)
End Function
Function Load()
LoadWorld("пример")
End Function
|
Вызов:
If KeyHit(66) Then Load()
|
Функция не изменилась, характеристики тоже. Способ разный. Первый - работает. Второй - не текстурит!
|