|
Tagi tematu: modu, od, podstaw, programowanie
|
| Autor |
Wiadomość
|
mafia573
modeluje w ac3d


Dołączył: 22 Lis 2009 Posty: 455
|
Wysłany: Sob 29 Sty, 2011 21:45 • 1 post w temacie
|
|
|
Jest gdzieś poradnik jak zaprogramować jakiś mod od podstaw, umie ktoś w ogóle wszystko od początku napisać jak tak to jak to zrobić ktoś by poradnik napisał.
Chce się trochę nauczyć.
|
|
|
|
 |
mafia573
modeluje w ac3d


Dołączył: 22 Lis 2009 Posty: 455
|
Wysłany: Nie 30 Sty, 2011 14:41 • 2 post w temacie
|
|
|
No znajdę gdzieś taki poradnik |
_________________ Szukam zdjęć Z020 (Zagon) (ok. 1984) jak ktoś ma proszę o kontakt.
Modeluje w AC3D, konwertuję, trochę programuję. GG
Silver Fletcher (Pierce Silver Arrow) 1933r.
 |
|
|
|
 |
sledziu1995


Dołączył: 09 Sie 2010 Posty: 1151
|
|
|
|
 |
mafia573
modeluje w ac3d


Dołączył: 22 Lis 2009 Posty: 455
|
Wysłany: Pon 31 Sty, 2011 19:17 • 4 post w temacie
|
|
|
| wolał bym w formie pisemnej |
_________________ Szukam zdjęć Z020 (Zagon) (ok. 1984) jak ktoś ma proszę o kontakt.
Modeluje w AC3D, konwertuję, trochę programuję. GG
Silver Fletcher (Pierce Silver Arrow) 1933r.
 |
|
|
|
 |
Amazone


Dołączył: 11 Maj 2010 Posty: 420 Skąd: Rozmierz
|
Wysłany: Pią 08 Kwi, 2011 22:12 • 5 post w temacie
|
|
|
Też by mnie to interesowało. Bym sobie mody sam programował |
|
|
|
 |
michas1970
||||||||||||||||||||


Dołączył: 19 Mar 2010 Posty: 4352 Skąd: okol. Torunia:))
|
Wysłany: Sob 09 Kwi, 2011 08:57 • 6 post w temacie
|
|
|
Nie ma takiego poradnika i wątpię że kiedykolwiek powstanie bo z programowaniem jest sporo zabawy po drugie jest tego sporo bo jak jeździsz traktorem w grze to to wszystko gdzieś musi być wpisane w odpowiedniej formie no i wreszcie jest konieczna znajomość języka C++ i LUA + dobrze operować językiem po angielsku
dlatego polecam wam analizowanie plików xml i lua modów |
|
|
|
 |
Adam 334


Dołączył: 09 Maj 2010 Posty: 356 Skąd: Tychów
|
Wysłany: Pią 15 Kwi, 2011 08:27 • 7 post w temacie
|
|
|
| michas1970, a żeś módry.Tyle to każdy potrafi.Dobra tak przy okazjii to zdał by się taki poradnik. |
_________________
Jeleń jest tylko jeden!
 |
|
|
|
 |
michas1970
||||||||||||||||||||


Dołączył: 19 Mar 2010 Posty: 4352 Skąd: okol. Torunia:))
|
Wysłany: Sob 30 Kwi, 2011 11:02 • 8 post w temacie
|
|
|
chcecie poradnik dam wam go ale będzie po angielsku co wy na to??
pss. translator wam tu nie wiele pomoże |
|
|
|
 |
cdplastyk
Super Moderator


Dołączył: 21 Kwi 2009 Posty: 1177 Skąd: Szczecin/ Resko
|
Wysłany: Pon 02 Maj, 2011 17:34 • 9 post w temacie
|
|
|
| Z chęcią skorzystam. Angielski nie jest tak koszmarnie trudny. Dodaj go to wrzucę do FAQ |
_________________ <b>Daj coś od siebie!</b>
ZANIM NAPISZESZ NOWY TEMAT KLIKNIJ!
Jeżeli jakiś post łamie regulamin powiadom o tym Moderatora/Administratora klikając .
NIE POMAGAM NA PW!- od tego jest forum!

 |
|
|
|
 |
Adam 334


Dołączył: 09 Maj 2010 Posty: 356 Skąd: Tychów
|
Wysłany: Pon 02 Maj, 2011 18:23 • 10 post w temacie
|
|
|
| Co do plików lua to mogę was trochę podszkolić.Wbrew pozorom to nie takie trudne.Wystarczy się tylko nauczyć kilku komend i trochę znać angielski. |
_________________
Jeleń jest tylko jeden!
 |
|
|
|
 |
michas1970
||||||||||||||||||||


Dołączył: 19 Mar 2010 Posty: 4352 Skąd: okol. Torunia:))
|
Wysłany: Sob 07 Maj, 2011 00:31 • 11 post w temacie
|
|
|
tutaj jest w zipie jest to z innej strony ale nie widziałem zakazu lecz nie wiem czy w środku nie ma reklam ale wątpię bo jest z jednego z oficjalnych for. sam poradnik jest natomiast napisany w pdf
a i przepraszm za pomyłkę kurs jest po niemiecku
http://www19.zippyshare.com/v/49350994/file.html
a jak byście chcieli to podrzucę wam parę skryptów lub ich podstaw
takie są:
Utils
FruitUtil
Lua Script Files
Vehicles
AIVehicleUtil.lua
Vehicle.lua
VehicleAttachEvent.lua
VehicleCamera.lua
VehicleDetachEvent.lua
VehicleEnterRequestEvent.lua
VehicleEnterResponseEvent.lua
VehicleLeaveEvent.lua
VehicleLowerImplementEvent.lua
VehicleMotor.lua
VehiclePlacementCallback.lua
WheelsUtil.lua
Specializations
AICombine.lua
AICombineSetStartedEvent.lua
AITractor.lua
AITractorLowerImplementEvent.lua
AITractorRaiseImplementEvent.lua
AITractorRotateLeftEvent.lua
AITractorRotateRightEvent.lua
AITractorSetStartedEvent.lua
AnimatedVehicle.lua
AnimatedVehicleStartEvent.lua
AnimatedVehicleStopEvent.lua
Attachable.lua
BaleLoader.lua
BaleLoaderStateEvent.lua
Baler.lua
BalerAreaEvent.lua
BalerCreateBaleEvent.lua
BalerSetBaleTimeEvent.lua
BalerSetIsUnloadingBaleEvent.lua
Combine.lua
CombineAreaEvent.lua
CombinePipeParticleActivatedEvent.lua
CombineSetChopperEnableEvent.lua
CombineSetPipeStateEvent.lua
CombineSetStrawEnableEvent.lua
CombineSetThreshingEnabledEvent.lua
Cultivator.lua
CultivatorAreaEvent.lua
Cutter.lua
CutterAreaEvent.lua
Cylindered.lua
Fillable.lua
Foldable.lua
FoldableSetFoldDirectionEvent.lua
ForageWagon.lua
ForageWagonAreaEvent.lua
Frontloader.lua
Hirable.lua
Honk.lua
HonkEvent.lua
ManureSpreader.lua
Milktruck.lua
Motorized.lua
MouseControlsVehicle.lua
Mower.lua
MowerAreaEvent.lua
PathVehicle.lua
Plough.lua
PloughAreaEvent.lua
PloughRotationEvent.lua
SetMotorTurnedOnEvent.lua
SetTurnedOnEvent.lua
Shovel.lua
SowingMachine.lua
SowingMachineAreaEvent.lua
SowingMachineSetIsFillingEvent.lua
SowingMachineSetSeedIndex.lua
Sprayer.lua
SprayerAreaEvent.lua
SprayerSetIsFillingEvent.lua
Steerable.lua
SteerableSetSpeedLevelEvent.lua
SteerableToggleLightEvent.lua
SteerableToggleRefuelEvent.lua
Tedder.lua
TedderAreaEvent.lua
TrafficVehicle.lua
Trailer.lua
TrailerToggleTipEvent.lua
VehicleSetBeaconLightEvent.lua
WindrowAreaEvent.lua
Windrower.lua
Triggers
BarnMoverTrigger.lua
BarrierTrigger.lua
CoinTelescopeTrigger.lua
GasStationTrigger.lua
HotspotTrigger.lua
InfospotTrigger.lua
ManureShovelTrigger.lua
MilktruckFillTrigger.lua
MilktruckStartTrigger.lua
PalletTrigger.lua
ShopTrigger.lua
SiloTrigger.lua
SowingMachineFillTrigger.lua
SprayerFillTrigger.lua
TeleportTrigger.lua
TipTrigger.lua
VisualPlayerTrigger.lua |
| Ostatnio edytowany przez michas1970, dnia: Sob 07 Maj, 2011 00:38, w sumie zmieniany 4 razy |
|
|
|
 |
Adam 334


Dołączył: 09 Maj 2010 Posty: 356 Skąd: Tychów
|
Wysłany: Nie 08 Maj, 2011 09:53 • 12 post w temacie
|
|
|
| michas1970 napisał/a: | | BarnMoverTrigger.lua | dało by radę wrzucić? |
_________________
Jeleń jest tylko jeden!
 |
|
|
|
 |
michas1970
||||||||||||||||||||


Dołączył: 19 Mar 2010 Posty: 4352 Skąd: okol. Torunia:))
|
Wysłany: Nie 08 Maj, 2011 15:11 • 13 post w temacie
|
|
|
dał bym ci linka do tej strony ale to zapewne zostanie potraktowane jak reklama więc po ryzykować
hmm tak może być:
| Kod: | 1 --
2 -- Barn Mover Trigger
3 --
4 -- @author Christian Ammann
5 -- @date 29/12/08
6 --
7 -- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved.
8
9 BarnMoverTrigger = {};
10
11 local BarnMoverTrigger_mt = Class(BarnMoverTrigger);
12
13 function BarnMoverTrigger:onCreate(id)
14 g_currentMission:addUpdateable(BarnMoverTrigger:new(id));
15 --print("created barn mover trigger, id: ", id);
16 end;
17
18 function BarnMoverTrigger:new(id, customMt)
19
20 local instance = {};
21 if customMt ~= nil then
22 setmetatable(instance, customMt);
23 else
24 setmetatable(instance, BarnMoverTrigger_mt);
25 end;
26
27 instance.triggerId = getChildAt(id, 0);
28 instance.triggerTargetId = getChildAt(id, 1);
29 if g_currentMission:getIsServer() then
30 addTrigger(instance.triggerId, "triggerCallback", instance);
31 end;
32 addTrigger(instance.triggerTargetId, "triggerCallbackTarget", instance);
33
34 instance.barnMoverTriggerSound = createSample("barnMoverTriggerSound");
35 loadSample(instance.barnMoverTriggerSound, "data/maps/sounds/cashRegistry.wav", false);
36
37 instance.dirLength = 0.008;
38 instance.dirX, instance.dirY, instance.dirZ = localDirectionToWorld(instance.triggerId, 0, 0, 1);
39 instance.dirX = instance.dirX*instance.dirLength;
40 instance.dirY = instance.dirY*instance.dirLength;
41 instance.dirZ = instance.dirZ*instance.dirLength;
42 instance.targetVelocity = 2;
43
44 instance.touched = {};
45
46 return instance;
47 end;
48
49 -- note: this is called as soon as the trigger entity is deleted
50 function BarnMoverTrigger:delete()
51
52 if g_currentMission:getIsServer() then
53 removeTrigger(self.triggerId);
54 end;
55 removeTrigger(self.triggerTargetId);
56
57 delete(self.barnMoverTriggerSound);
58
59 end;
60
61 function BarnMoverTrigger:update(dt)
62
63 for k,touched in pairs(self.touched) do
64 local vx, vy, vz = getLinearVelocity(k);
65 local dot = vx*self.dirX + vy*self.dirY + vz*self.dirZ;
66 local v = dot/self.dirLength;
67
68 if v < self.targetVelocity then
69 local scale = dt*touched.mass;
70 addForce(k, self.dirX*dt, self.dirY*dt, self.dirZ*dt, 0, 0, 0, true);
71 end;
72 end;
73
74 end;
75
76 function BarnMoverTrigger:triggerCallback(triggerId, otherId, onEnter, onLeave, onStay)
77
78 if onEnter then
79 local touched = self.touched[otherId];
80 if touched ~= nil then
81 touched.count = touched.count+1;
82 else
83 local mass = getMass(otherId);
84 self.touched[otherId] = {mass=mass, count=1};
85 end;
86 elseif onLeave then
87 local touched = self.touched[otherId];
88 if touched ~= nil then
89 if touched.count > 1 then
90 touched.count = touched.count-1;
91 else
92 self.touched[otherId] = nil;
93 end;
94 end;
95 end;
96
97 end;
98
99 function BarnMoverTrigger:triggerCallbackTarget(triggerId, otherId, onEnter, onLeave, onStay)
100
101 if onEnter then
102 -- this happens, if a compound child of a deleted compound is entering
103 if otherId ~= 0 then
104 local object = g_currentMission:getNodeObject(otherId);
105 --local isStrawbale = getUserAttribute(otherId, "isStrawbale");
106 --local isHaybale = getUserAttribute(otherId, "isHaybale");
107
108 self.touched[otherId] = nil;
109 --if (isStrawbale ~= nil and isStrawbale) or (isHaybale ~= nil and isHaybale) then
110 if object ~= nil then
111 if object:isa(Bale) then
112 if self.barnMoverTriggerSound ~= nil then
113 playSample(self.barnMoverTriggerSound, 1, 1, 0);
114 end;
115
116 if g_currentMission:getIsServer() then
117 --print("Bale stored: ", tostring(otherId));
118 local difficultyMultiplier = 2 ^ (3 - g_currentMission.missionStats.difficulty);
119 local baseValue = object:getValue(); --400;
120 --if isHaybale ~= nil and isHaybale then
121 -- baseValue = 800;
122 --end;
123 g_currentMission:addSharedMoney(baseValue * difficultyMultiplier);
124 object:delete();
125 end;
126 if g_currentMission.baleCount ~= nil then
127 g_currentMission.baleCount = g_currentMission.baleCount + 1; -- for straw elevator mission
128 end;
129 elseif not object:isa(Vehicle) then -- do not delete vehicles, but everything else
130 if g_currentMission:getIsServer() then
131 object:delete();
132 end;
133 end;
134 else
135 if g_currentMission.nodeToVehicle[otherId] == nil then
136 -- there is nothing that could end up here, since physics objects are an object, thus this could only introduce bugs
137 --delete(otherId);
138 end;
139 end;
140
141 end;
142 end;
143
144 end;
|
postaram się wszystkie spakować i wrzucić na forum w najbliższym czasie |
| Ostatnio edytowany przez michas1970, dnia: Nie 08 Maj, 2011 15:13, w sumie zmieniany 1 raz |
|
|
|
 |
przemo222


Dołączył: 01 Maj 2011 Posty: 336 Skąd: minsk mazowiecki
|
Wysłany: Nie 08 Maj, 2011 22:00 • 14 post w temacie
|
|
|
kogo nauczyc programowac |
_________________ kto gra w Minecraft
 |
|
|
|
 |
GucioLS


Dołączył: 10 Gru 2010 Posty: 98 Skąd: Łódź
|
Wysłany: Sro 18 Maj, 2011 16:39 • 15 post w temacie
|
|
|
Jaaa!!! W programowaniu to tylko o to chodzi by podmienić model starego taktora na nowy i indexy poustawiać
|
_________________ Modeluje - Programuje - Konwertuje
http://www.psptube.pl/index.php?ap=56655
"klik" Z góry dziękuję! |
|
|
|
 |
|
|
 |
|
|
|
|